pawn Код:
if(strcmp(cmd, "/starttrash", true) == 0)
{
if(!(GetPlayerJob(playerid, 11))) return ErrorMessage(playerid, "You are not a trashman.");
if(IsPlayerInAnyVehicle(playerid))
{
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 408)
{
if(GetPVarInt(playerid, "StartedTrash") == 0)
{
if (GetPlayerVehicleSeat(playerid) != 0) return ErrorMessage(playerid, "You must be the driver of the vehicle.");
for (new i = 0; i < MAX_PLAYERS; i ++)
{
if (GarbageTruck[i] == GetPlayerVehicleID(playerid))
{
SendClientMessage(playerid, GREY, "Somebody is already working with this truck.");
return 1;
}
}
SendClientMessage(playerid, YELLOW, "You've started the trashman job. Find some garbage bags around the area and load them into your truck.");
SendClientMessage(playerid, YELLOW, "Simply exit the vehicle and run through the garbage bag. Go to the back of the truck and press Y to load it.");
SendClientMessage(playerid, YELLOW, "When you're finished, go to the dump and type /unloadtrash at the yellow icon to receive your paycheck.");
SendClientMessage(playerid, YELLOW, "If you ever get tired of working, type /stoptrash.");
SetPVarInt(playerid, "StartedTrash", 1);
SetPlayerCheckpoint(playerid, 2233.1540, -1645.8969, 15.4857, 1.0);
GarbageTruck[playerid] = GetPlayerVehicleID(playerid);
return 1;
}
else return ErrorMessage(playerid, "You are already doing the trash job! Use /stoptrash to stop the job.");
}
else return ErrorMessage(playerid, "You can only work in a trashmaster.");
}
else { ErrorMessage(playerid, "You aren't in a vehicle."); }
return 1;
}
Alright That's the command.It says when I get the trash to go to the checkpoint and press ''Y'' but when I do this, nothing happen.I dont know why? Can someone help me please?