SA-MP Forums Archive
ReturnUser feil - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: ReturnUser feil (/showthread.php?tid=279138)



ReturnUser feil - Aprezt - 25.08.2011

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;
    }



Re: ReturnUser feil - Dragony92 - 25.08.2011

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


Re: ReturnUser feil - Aprezt - 25.08.2011

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