28.01.2012, 02:53
hi guys i got a problem i made a command for /giveadmin but when i compile it, i get the error, why?.
Код:
dcmd_giveadmin(playerid, params[]) //error line { if(gPlayerInfo[playerid][PLAYER_LEVEL] < gCommands[GIVEADMIN]) { new string[128]; format(string, sizeof(string), "You must be a level %d administrator to use that command!", gCommands[GIVEADMIN]); SendClientMessage(playerid, COLOR_ORANGE, string); } else { new tmp[256], tmp2[256], index, id; tmp = strtok(params, index); tmp2 = strtok(params, index); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_ORANGE, "[GIVEADMIN] Usage: /giveadmin [ID]"); } else if(!strlen(tmp2)) { SendClientMessage(playerid, COLOR_ORANGE, "[GIVEADMIN] Usage: /giveadmin [ID]"); } else { id = strval(tmp); if(!IsPlayerConnected(id)) { SendClientMessage(playerid, COLOR_ORANGE, "[GIVEADMIN] That player is not connected."); } else if(id == playerid) { SendClientMessage(playerid, COLOR_ORANGE, "[GIVEADMIN] You are allready admin!."); } else { SendClientMessage(id, LIGHTBLUE, "Congratulations you have recieved admin!"); dini_IntSet(file, "Level", 1); } } } return 1; }