CMD:munka_banyasz(playerid){if(GetPlayerTeam(playerid) == BANYASZ) { new jarmu; jarmu = GetPlayerVehicleID(playerid); if(jarmu==486) { SendClientMessage(playerid , COLOR_YELLOW,\"Elkezdtél dolgozni, menj a kijelölt helyekre.\"); SetPlayerCheckpoint(playerid , -1894.3909,-1750.8854,21.7500,8.5); SetPVarInt(playerid,\"banyaszcp\",0); } else { SendClientMessage(playerid , COLOR_WHITE,\"Nem ülsz dózerbe , így nem tudod elkezdeni a munkát.\"); } return 1; }return 0;}
public OnPlayerEnterCheckpoint(playerid){ if(GetPVarInt(playerid,\"banyaszcp\") == 0) // Elsõ CP { SetPlayerCheckpoint(playerid, -1920.7643,-1714.8641,21.9083,8.5); SetPVarInt(playerid,\"banyaszcp\", 1);}if(GetPVarInt(playerid,\"banyaszcp\") == 1) // Második CP { SetPlayerCheckpoint(playerid,-1869.5566,-1717.8596,21.7500,8.5); SetPVarInt(playerid,\"banyaszcp\", 2); } if(GetPVarInt(playerid,\"banyaszcp\") == 2) // Harmadik CP { SetPlayerCheckpoint(playerid,-1868.2203,-1671.2141,21.7500,8.5); SetPVarInt(playerid,\"banyaszcp\", 3); } if(GetPVarInt(playerid,\"banyaszcp\") == 3) // 4 { SetPlayerCheckpoint(playerid,-1923.6233,-1731.0911,22,8.5); SetPVarInt(playerid,\"banyaszcp\", 4); } if(GetPVarInt(playerid,\"banyaszcp\") == 4) // 5 { SetPlayerCheckpoint(playerid,-1867.9788,-1716.7721,21.7500,8.5); SetPVarInt(playerid,\"banyaszcp\", 5); } if(GetPVarInt(playerid,\"banyaszcp\") == 5) // 5 { SetPlayerCheckpoint(playerid,-1855.6295,-1677.2148,21.7564,8.5); SetPVarInt(playerid,\"banyaszcp\", 6); } if(GetPVarInt(playerid,\"banyaszcp\") == 6) // 5 { SetPlayerCheckpoint(playerid,-1894.3909,-1750.8854,21.7500,8.5); DisablePlayerCheckpoint(playerid); GameTextForPlayer(playerid , \"~g~ Sikeresen elvégezted a ~w~ munkát ! \",5000,1); GivePlayerMoney(playerid , 10000); } return 1;}
Vagy alapból az elnredezéssel van a baj ?
CMD:munka_banyasz(playerid){if(GetPlayerTeam(playerid) == BANYASZ){new jarmu;jarmu = GetPlayerVehicleID(playerid);if(jarmu==486){ SendClientMessage(playerid , COLOR_YELLOW,\"Elkezdtél dolgozni, menj a kijelölt helyekre.\"); SetPlayerCheckpoint(playerid , -1894.3909,-1750.8854,21.7500,8.5); SetPVarInt(playerid,\"banyaszcp\",0);}else{ SendClientMessage(playerid , COLOR_WHITE,\"Nem ülsz dózerbe , így nem tudod elkezdeni a munkát.\");}} return 1;}
CMD:munka_banyasz(playerid, params[]){ #pragma unused params if(GetPlayerTeam(playerid) == BANYASZ) { SetPVarInt(playerid, \"Dozer\", GetPlayerVehicleID(playerid)); if((GetPVarInt(playerid, \"Dozer\") == 486)) { SendClientMessage(playerid , COLOR_YELLOW,\"Elkezdtél dolgozni, menj a kijelölt helyekre.\"); SetPlayerCheckpoint(playerid , -1894.3909,-1750.8854,21.7500,8.5); SetPVarInt(playerid,\"banyaszcp\",0); } else { SendClientMessage(playerid , COLOR_WHITE,\"Nem ülsz dózerbe , így nem tudod elkezdeni a munkát.\"); } } return 1;}
CMD:munka_banyasz(playerid){ if(GetPlayerTeam(playerid) == BANYASZ) { if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 486) { SendClientMessage(playerid , COLOR_YELLOW,\"Elkezdtél dolgozni, menj a kijelölt helyekre.\"); SetPlayerCheckpoint(playerid , -1894.3909,-1750.8854,21.7500,8.5); SetPVarInt(playerid,\"banyaszcp\",0); } else { SendClientMessage(playerid , COLOR_WHITE,\"Nem ülsz dózerbe , így nem tudod elkezdeni a munkát.\"); } return 1; } return 0;}
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 486)
switch(GetPVarInt(playerid,\"banyaszcp\")) { case 1: // Elsõ CP { SetPVarInt(playerid,\"banyaszcp\", 2); } case 2: // Második CP { }}