CMD:munka(playerid, params[])
{
if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,-1,\"Csak autóban mûködik a parancs.\");
new vehid = GetPlayerVehicleID(playerid);
new model = GetVehicleModel(vehid);
if(model == 524)
{
if(olaj[playerid] > 3 && olaj[playerid] < 1)
{
olaj[playerid] = 1;
}
new name[MAX_PLAYER_NAME], string[200];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), \"{ff9900}Kamionos {00ff15}%s {ff9900}Elkezdte Szállítani a Cementet! \", name );
SendClientMessageToAll(COLOR_YELLOW, string);
if(olaj[playerid] == 1)
{
olaj[playerid] = 2;
SetPlayerCheckpoint(playerid,1944.7424,-1771.1267,13.1157,10);
return 1;
}
else if(olaj[playerid] == 2)
{
olaj[playerid] = 3;
SetPlayerCheckpoint(playerid,1003.4263,-941.8485,41.8079,10);
return 1;
}
else if(olaj[playerid] == 3)
{
olaj[playerid] = 1;
SetPlayerCheckpoint(playerid,-97.8173,-1166.7585,2.2650,10);
return 1;
}
}
else
{
RemovePlayerFromVehicle(playerid);
SendClientMessage(playerid,-1,\"Csak cementszállítóval szállíthatsz cementet.\");
}
return 1;
}
Hiányzott egy \"RemovePlayerFromVehicle(playerid);\" függvény.
ZyZu logic, már, bocs az offért, és am az a baj amit Rupert írt.