Ja habs nicht gelesen aber es ändert nix am jetzigen Problem.😂
Truckerjob
- RaPTiiC
- Geschlossen
- Erledigt
Wichtiger Hinweis: Bitte ändert nicht manuell die Schriftfarbe auf schwarz sondern belasst es bei der Standardeinstellung. Somit tragt ihr dazu bei dass euer Text auch bei Verwendung unseren dunklen Forenstils noch lesbar ist!
Tipp: Ihr wollt längere Codeausschnitte oder Logfiles bereitstellen? Benutzt unseren eigenen PasteBin-Dienst Link
-
-
Ändert sich nix... so wie ich es verstanden habe
soll ich das so machen
C:\Users\Dustin\Desktop\SAMP Server\gamemodes\reallife.pwn(1622) : warning 219: local variable "pTrailer" shadows a variable at a preceding level
C:\Users\Dustin\Desktop\SAMP Server\gamemodes\reallife.pwn(1622) : error 008: must be a constant expression; assumed zero
C:\Users\Dustin\Desktop\SAMP Server\gamemodes\reallife.pwn(1622) : error 008: must be a constant expression; assumed zero
C:\Users\Dustin\Desktop\SAMP Server\gamemodes\reallife.pwn(1622) : error 036: empty statement
C:\Users\Dustin\Desktop\SAMP Server\gamemodes\reallife.pwn(1622) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
4 Errors.
Code
Alles anzeigenocmd:starttrucking(playerid, params[]) { if(PlayerInfo[playerid][pJob] !=2)return SendClientMessage(playerid, COLOR_DARKRED," Du bist kein Trucker!"); if(!IsPlayerInRangeOfPoint(playerid, 5, 96.8982,-277.0232,1.5781)) return SendClientMessage(playerid, COLOR_DARKRED," Du bist nicht in der nähe des Fleischbergs!"); truckveh[playerid] = CreateVehicle(403,64.6539,-269.9494,1.1424, 0, 0, -1, 0); PutPlayerInVehicle(playerid, truckveh[playerid], 0); SendClientMessage(playerid,COLOR_DARKGREEN,"[JOBINFO]: Um das Trucken zu beginnen starte den Motor begebe dich an einem sicheren Ort um deinen Anhänger anzukoppeln!"); SendClientMessage(playerid,COLOR_DARKGREEN,"[JOBINFO]: /gettrailer [Waren/Benzin]"); return 1; } new trailerwaren, pTrailer[MAX_PLAYERS]; ocmd:gettrailer(playerid, params[]) { new item[64]; if(sscanf(params, "s[64]", item))return SendClientMessage(playerid, COLOR_YELLOW, "[INFO]: /gettrailer [Waren/Benzin]"); if(!strcmp(item, "Waren", true)) { if(!IsPlayerInVehicle(playerid, truckveh[playerid])) return SendClientMessage(playerid, COLOR_DARKRED," Du sitzt nicht im richtigen Truck!"); new pTrailer[playerid] = CreateVehicle(435, 58.6176,-270.3957,1.3052, 0.0, 0, 0, -1); //1622 //AttachTrailerToVehicle(trailerwaren[playerid], truckveh[playerid]); SetTimerEx("AttachTrailer",700,false,"i",playerid); SendClientMessage(playerid, COLOR_WHITE, "PLATZHALTER WAREN!"); } if(!strcmp(item, "Benzin", true)) { if(!IsPlayerInVehicle(playerid, truckveh[playerid])) return SendClientMessage(playerid, COLOR_DARKRED," Du sitzt nicht im richtigen Truck!"); new pTrailer[playerid] = CreateVehicle(584, 58.6176,-270.3957,1.3052, 0.0, 0, 0, -1); //AttachTrailerToVehicle(trailerbenzin[playerid], truckveh[playerid]); SetTimerEx("AttachTrailer",700,false,"i",playerid); SendClientMessage(playerid, COLOR_WHITE, "PLATZHALTER BENZIN!"); } return 1; } public AttachTrailer(playerid) { if(IsVehicleStreamedIn(trailer[playerid], playerid)) { AttachTrailerToVehicle(pTrailer[playerid], truckveh[playerid]); } else { SendClientMessage(playerid, 0xFF0000AA, "Trailer konnte nicht gestreamt werden."); } }
-
Ändert sich nix... so wie ich es verstanden habe
soll ich das so machen
C:\Users\Dustin\Desktop\SAMP Server\gamemodes\reallife.pwn(1622) : warning 219: local variable "pTrailer" shadows a variable at a preceding level
C:\Users\Dustin\Desktop\SAMP Server\gamemodes\reallife.pwn(1622) : error 008: must be a constant expression; assumed zero
C:\Users\Dustin\Desktop\SAMP Server\gamemodes\reallife.pwn(1622) : error 008: must be a constant expression; assumed zero
C:\Users\Dustin\Desktop\SAMP Server\gamemodes\reallife.pwn(1622) : error 036: empty statement
C:\Users\Dustin\Desktop\SAMP Server\gamemodes\reallife.pwn(1622) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
4 Errors.
Code
Alles anzeigenocmd:starttrucking(playerid, params[]) { if(PlayerInfo[playerid][pJob] !=2)return SendClientMessage(playerid, COLOR_DARKRED," Du bist kein Trucker!"); if(!IsPlayerInRangeOfPoint(playerid, 5, 96.8982,-277.0232,1.5781)) return SendClientMessage(playerid, COLOR_DARKRED," Du bist nicht in der nähe des Fleischbergs!"); truckveh[playerid] = CreateVehicle(403,64.6539,-269.9494,1.1424, 0, 0, -1, 0); PutPlayerInVehicle(playerid, truckveh[playerid], 0); SendClientMessage(playerid,COLOR_DARKGREEN,"[JOBINFO]: Um das Trucken zu beginnen starte den Motor begebe dich an einem sicheren Ort um deinen Anhänger anzukoppeln!"); SendClientMessage(playerid,COLOR_DARKGREEN,"[JOBINFO]: /gettrailer [Waren/Benzin]"); return 1; } new trailerwaren, pTrailer[MAX_PLAYERS]; ocmd:gettrailer(playerid, params[]) { new item[64]; if(sscanf(params, "s[64]", item))return SendClientMessage(playerid, COLOR_YELLOW, "[INFO]: /gettrailer [Waren/Benzin]"); if(!strcmp(item, "Waren", true)) { if(!IsPlayerInVehicle(playerid, truckveh[playerid])) return SendClientMessage(playerid, COLOR_DARKRED," Du sitzt nicht im richtigen Truck!"); new pTrailer[playerid] = CreateVehicle(435, 58.6176,-270.3957,1.3052, 0.0, 0, 0, -1); //1622 //AttachTrailerToVehicle(trailerwaren[playerid], truckveh[playerid]); SetTimerEx("AttachTrailer",700,false,"i",playerid); SendClientMessage(playerid, COLOR_WHITE, "PLATZHALTER WAREN!"); } if(!strcmp(item, "Benzin", true)) { if(!IsPlayerInVehicle(playerid, truckveh[playerid])) return SendClientMessage(playerid, COLOR_DARKRED," Du sitzt nicht im richtigen Truck!"); new pTrailer[playerid] = CreateVehicle(584, 58.6176,-270.3957,1.3052, 0.0, 0, 0, -1); //AttachTrailerToVehicle(trailerbenzin[playerid], truckveh[playerid]); SetTimerEx("AttachTrailer",700,false,"i",playerid); SendClientMessage(playerid, COLOR_WHITE, "PLATZHALTER BENZIN!"); } return 1; } public AttachTrailer(playerid) { if(IsVehicleStreamedIn(trailer[playerid], playerid)) { AttachTrailerToVehicle(pTrailer[playerid], truckveh[playerid]); } else { SendClientMessage(playerid, 0xFF0000AA, "Trailer konnte nicht gestreamt werden."); } }
Was mir aufgefallen ist bei "Benzin" & "Waren" benutzt du new pTrailer[playerid] = CreateVehicle....
Aber du hast doch schon oben
stehen. Versuch mal das new bei pTrailer[playerid] bei Benzin & Waren wegzulassen
-
Code
Alles anzeigenocmd:gettrailer(playerid, params[]) { new item[64]; if(sscanf(params, "s[64]", item))return SCM(playerid, COLOR_YELLOW, "[INFO]: /gettrailer [Waren/Benzin]"); if(!strcmp(item, "Waren", true)) { if(!IsPlayerInVehicle(playerid, truckveh[playerid])) return SCM(playerid, COLOR_DARKRED," Du sitzt nicht im richtigen Truck!"); pTrailer[playerid] = CreateVehicle(435, 58.6176,-270.3957,1.3052, 0.0, 0, 0, -1); //1620 SetTimerEx("AttachTrailer",1100,false,"i",playerid); } if(!strcmp(item, "Benzin", true)) { if(!IsPlayerInVehicle(playerid, truckveh[playerid])) return SCM(playerid, COLOR_DARKRED," Du sitzt nicht im richtigen Truck!"); pTrailer[playerid] = CreateVehicle(584, 58.6176,-270.3957,1.3052, 0.0, 0, 0, -1); SetTimerEx("AttachTrailer",1100,false,"i",playerid); } return 1; }
//hab ihm Privatg geholfen klappt nun.
-
breadfish.de
Hat das Thema geschlossen.