08.11.2010, 03:40
cant pass player id like that try this
pawn Код:
forward CheckTrailer();
public CheckTrailer(){
for(new i=0;i<MAX_PLAYERS;i++){
printf("%d",IsTrailerAttachedToVehicle(GetPlayerVehicleID(i)));
printf("%d",Trucking[i]);
printf("%d",TimeLeft[i]);
new vehicleid = GetPlayerVehicleID(i);
if(Trucking[i] > 1 && !IsTrailerAttachedToVehicle(i)){
if(TimeLeft[i] == 0) {
TimeLeft[i] = 60;
Trucking[i] = 0;
PlayerInfo[i][pJob] = 0;
InfoBoxForPlayer(i, "~g~Fired~n~~n~~w~You were supposed to keep it together. The Boss has ~r~fired ~w~you");
return 0;
}
TimeLeft[i] --;
new string[128];
format(string, sizeof(string), "You have ~g~%d ~w~seconds left to attach the trailer", TimeLeft[i]);
GameTextForPlayer(i,string, 1000, 5);
}
else {
TimeLeft[i] = 60;
}
}
return 1;
}