25.07.2009, 11:42
Код:
if (strcmp(cmd, "/setatv", true)==0) { if(IsPlayerConnected(playerid)) { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GRAD2, "KORISTITE: /setatv [IgracevID/DioImena]"); return 1; } giveplayerid = ReturnUser(tmp); if (PlayerInfo[playerid][pAdmin] >= 1 || PlayerInfo[playerid][pEventMember] == 1) { if(IsPlayerConnected(giveplayerid)) { SetPlayerRaceCheckpoint(playerid, 0, -1903.8059,-2425.9177,31.2977, -1707.7430,-2301.0586,44.7366, 10); Status[giveplayerid] = 1; GetPlayerName(playerid, sendername, sizeof(sendername)); GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer)); format(string, sizeof(string), "ATV ORGANIZATOR %s je pozvao %s na ATV Race!", sendername, giveplayer); SendClientMessageToAll(COLOR_LIGHTRED, string); } } else { SendClientMessage(playerid, COLOR_GRAD2, " Niste autorizirani za koristenje ove komande !"); } } return 1; }
Код:
public OnPlayerEnterRaceCheckpoint(playerid) { if (IsPlayerInCheckpoint(playerid)) { if(Status[playerid] == 1) { DisablePlayerRaceCheckpoint(playerid); SetPlayerRaceCheckpoint(playerid, 0, -1707.7430,-2301.0586,44.7366, -1687.8019,-2110.9001,37.9219, 10); Status[playerid] = 2; } if(Status[playerid] == 2) { DisablePlayerRaceCheckpoint(playerid); SetPlayerRaceCheckpoint(playerid, 0, -1687.8019,-2110.9001,37.9219, -1938.1582,-2082.5066,64.6393, 10); Status[playerid] = 3; } if(Status[playerid] == 3) { DisablePlayerRaceCheckpoint(playerid); SetPlayerRaceCheckpoint(playerid, 0, -1938.1582,-2082.5066,64.6393, -1910.4208,-1933.2887,82.1451, 10); //so it looks down Status[playerid] = 4; } if(Status[playerid] == 4) { DisablePlayerRaceCheckpoint(playerid); SetPlayerRaceCheckpoint(playerid, 0, -1910.4208,-1933.2887,82.1451, -1649.9202,-1901.3309,90.0945, 10); //so it looks down Status[playerid] = 5; } if(Status[playerid] == 5) { DisablePlayerRaceCheckpoint(playerid); SetPlayerRaceCheckpoint(playerid, 0, -1649.9202,-1901.3309,90.0945, -1504.0736,-1789.0613,53.7451, 10); //so it looks down Status[playerid] = 6; } if(Status[playerid] == 6) { DisablePlayerRaceCheckpoint(playerid); SetPlayerRaceCheckpoint(playerid, 0, -1504.0736,-1789.0613,53.7451, -1385.3934,-2037.6733,2.8500, 10); //so it looks down Status[playerid] = 7; } if(Status[playerid] == 7) { DisablePlayerRaceCheckpoint(playerid); SetPlayerRaceCheckpoint(playerid, 0, -1385.3934,-2037.6733,2.8500, -1339.0548,-2178.6096,21.0252, 10); //so it looks down Status[playerid] = 8; } if(Status[playerid] == 8) { DisablePlayerRaceCheckpoint(playerid); SetPlayerRaceCheckpoint(playerid, 0, -1339.0548,-2178.6096,21.0252, -1546.3350,-2154.8752,7.9989, 10); //so it looks down Status[playerid] = 9; } if(Status[playerid] == 9) { DisablePlayerRaceCheckpoint(playerid); SetPlayerRaceCheckpoint(playerid, 0, -1546.3350,-2154.8752,7.9989, -1676.7329,-2241.9336,35.1836, 10); //so it looks down Status[playerid] = 10; } if(Status[playerid] == 10) { DisablePlayerRaceCheckpoint(playerid); SetPlayerRaceCheckpoint(playerid, 0, -1676.7329,-2241.9336,35.1836, -1908.9034,-2427.6821,30.8202, 10); //so it looks down Status[playerid] = 11; } if(Status[playerid] == 11) { DisablePlayerRaceCheckpoint(playerid); SetPlayerRaceCheckpoint(playerid, 1, -1908.9034,-2427.6821,30.8202, -1908.9034,-2427.6821,30.8202, 10); //so it looks down Status[playerid] = 12; } if(Status[playerid] == 12) { new string[128]; new name[MAX_PLAYER_NAME]; DisablePlayerRaceCheckpoint(playerid); Status[playerid] = 0; GetPlayerName(playerid, name, sizeof(name)); format(string, sizeof(string), "ATV Race : %s je upravo zavrsio ATV Race. ", name); SendClientMessageToAll(COLOR_LIGHTRED, string); } } return 1; }
What am i doing wrong??Can someone help me??
PS.When i am compiling gamemode,i don't have any errors or warnings...