help me with some error
#3

The first 2 errors are of your include file. Other errors i have fixed them you may try.
Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/settadmin", cmdtext, true, 10) == 0)
    {
        if((IsPlayerAdmin(playerid) == 1) || (Player[playerid][Livello] == 3))
        {
        new name2[MAX_PLAYER_NAME];
        GetPlayerName(playerid,name2,sizeof(name2));
        new tmp[256];
        new     id;
        new lvadmin;
		new idx;
        tmp = strtok(cmdtext, idx);

        if(!strlen(tmp)){
        SendClientMessage(playerid, COLOR_RED, ".:ERRORE:. UTILIZZA: /settadmin [playerid][livello]");
        return 1;
        }
        id = strval(tmp);
        if(!IsPlayerConnected(id)){
        SendClientMessage(playerid, COLOR_RED, ".:ERRORE:. Il Giocatore non и connesso");
        return 1;}
        tmp = strtok(cmdtext, idx);
        if(!strlen(tmp)) {
        SendClientMessage(playerid, COLOR_RED, ".:ERRORE:. UTILIZZA: /settadmin [playerid][livello]");
        return 1;}
        lvadmin = strval(tmp);
        if((lvadmin != 0) && (lvadmin != 1) && (lvadmin != 2) && (lvadmin != 3)){
        SendClientMessage(playerid, COLOR_YELLOW, ".:ATTENZIONE:. I livello sono 0 / 1 / 2 / 3");
        return 1;}
        new name[MAX_PLAYER_NAME];
        GetPlayerName(playerid,name,sizeof(name));
        GetPlayerName(id, name2, sizeof(name2));
        format(string, sizeof(string), ".:ESEGUITO:. %s ha settato il livello admin di %s in %d",name, name2, lvadmin);
        Player[id][Livello] = lvadmin;
        SendClientMessageToAll(COLOR_RED, string);
        return 1;
        }
        else{
        SendClientMessage(playerid, COLOR_RED, ".:ERROR:. Non puoi utilizzare questo comando");}
        return 1;
        }
Reply


Messages In This Thread
help me with some error - by kevi11 - 03.04.2016, 08:08
Re: help me with some error - by JohnBlaze1971 - 03.04.2016, 08:12
Re: help me with some error - by JohnBlaze1971 - 03.04.2016, 08:14
Re: help me with some error - by kevi11 - 03.04.2016, 08:22

Forum Jump:


Users browsing this thread: 3 Guest(s)