ReturnUser feil
#1

Hello today i started make a new gamemode and i got error when i make /makeadmin In Estonian "/mддraadminniks".
I got error. undefined symbol "ReturnUser".

pawn Code:
public OnPlayerCommandText(playerid, cmdtext[])
{
    new string[256];
    new idx, teine;
    new cmd[256];
    new tmp[256];
    new sendername[MAX_PLAYER_NAME];
    new giveplayer[MAX_PLAYER_NAME];
    cmd = strtok(cmdtext, idx);
   
    if(strcmp(cmd, "/mддraadmin", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            tmp = strtok(cmdtext, idx);
            if(!strlen(tmp))
            {
                SendClientMessage(playerid, HELESININE, "KASUTUS: {FFFFFF}/mддraadmin [Mдngijaid/Osanimest] [level]");
                return 1;
            }
            tmp = strtok(cmdtext, idx);
            new level;
            teine = ReturnUser(tmp);
            level = strval(tmp);
            if (KasutajaInfo[playerid][pAdmin] >= 1337)
            {
                if(IsPlayerConnected(teine))
                {
                    if(teine != INVALID_PLAYER_ID)
                    {
                        GetPlayerName(teine, giveplayer, sizeof(giveplayer));
                        GetPlayerName(playerid, sendername, sizeof(sendername));
                        KasutajaInfo[teine][pAdmin] = level;
                        format(string, sizeof(string), "Sa edutasid mдngija %s level %d Administraatoriks.",giveplayer, level);
                        SendClientMessage(playerid, HALL, string);
                        format(string, sizeof(string), "Admninistraator %s edutas su level %d administraatoriks.", sendername, level);
                        SendClientMessage(teine, HALL, string);
                    }
                }
            }
            else
            {
                SendClientMessage(playerid, HALL, "Sul pole piisavalt хigusi!");
            }
        }
        return 1;
    }
Reply
#2

If you are starting to script new game mode use ycmd or zcmd process...
Reply
#3

Quote:
Originally Posted by Dragony92
View Post
If you are starting to script new game mode use ycmd or zcmd process...
yeah but i dosen`t understand zcmd or ycmd.... strcmd is so easy to me


// Edit MBY help not postcount
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)