SA-MP Forums Archive
GRRRRRRRR ZCMD wont work for me -.- - 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: GRRRRRRRR ZCMD wont work for me -.- (/showthread.php?tid=289300)



GRRRRRRRR ZCMD wont work for me -.- - DaRkAnGeL[NBK] - 11.10.2011

hey i was trying to create a new filterscript but nope not gunna work for some wierd reason as zcmd is really not wanting to work okay so basically i have zcmd.inc so the first code ill give is gunna be

pawn Код:
#include <zcmd>
okay so thats included no errors untill :

pawn Код:
public OnPlayerCommandText(playerid,cmdtext[])
{
CMD:setvip(playerid, params[])
{
    if(PlayerInfo[playerid][pAdminLevel] >= 1 || IsPlayerAdmin(playerid) == 1)
    {
        new id, level;
        if(sscanf(params,"ui", id, level) return SendClientMessage(playerid, -1,"SYNTAX: /setvip [id] [leve]");
        {
            PlayerInfo[id][pVip] = level;
        }
    }
    else SendClientMessage(playerid, -1,"You are not an Admin!");
    return 1;
}
return 0;
}
that should be correct right ?! well no -.- i now get this;

pawn Код:
C:\Users\Admin\Desktop\SAMP\Fas FreeRoam\filterscripts\saving2.pwn(163) : error 029: invalid expression, assumed zero
C:\Users\Admin\Desktop\SAMP\Fas FreeRoam\filterscripts\saving2.pwn(163) : error 017: undefined symbol "cmd_setvip"
C:\Users\Admin\Desktop\SAMP\Fas FreeRoam\filterscripts\saving2.pwn(163) : error 029: invalid expression, assumed zero
C:\Users\Admin\Desktop\SAMP\Fas FreeRoam\filterscripts\saving2.pwn(163) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.
its like zcmd isnt even included


Re: GRRRRRRRR ZCMD wont work for me -.- - DaRkAnGeL[NBK] - 11.10.2011

nvm doesnt need the public OnPlayerCommandText


Re: GRRRRRRRR ZCMD wont work for me -.- - Johndaonee - 11.10.2011

Do not use it inside the onplayer command text, have it outside functions


Re: GRRRRRRRR ZCMD wont work for me -.- - DaRkAnGeL[NBK] - 11.10.2011

thanks


Re: GRRRRRRRR ZCMD wont work for me -.- - DaRkAnGeL[NBK] - 11.10.2011

okay for some reason its not make the player VIP
pawn Код:
CMD:setvip(playerid, params[])
{
    if(IsPlayerAdmin(playerid))
    {
        new id, level;
        if(sscanf(params,"ui", id, level)) return SendClientMessage(playerid, -1,"SYNTAX: /setvip [id] [level]");
        {
            PlayerInfo[id][pVIP] = level;
        }
    }
    else SendClientMessage(playerid, -1,"You are not an Admin!");
    return 1;
}



Re: GRRRRRRRR ZCMD wont work for me -.- - GrimR - 11.10.2011

Need to check if id == INVALID_PLAYER_ID as sscanf will not cause your message to be sent if the id is not valid.


Re: GRRRRRRRR ZCMD wont work for me -.- - DaRkAnGeL[NBK] - 11.10.2011

um pawn code for this please?


Re: GRRRRRRRR ZCMD wont work for me -.- - GrimR - 11.10.2011

Well I was hoping you would work it out lol.

pawn Код:
if (id == INVALID_PLAYER_ID) { return SendClientMessage(playerid, -1, "No player online with that id."); }
If an invalid ID is the reason which this message will tell you, use a valid ID lol. Other than that I see no problems.


Re: GRRRRRRRR ZCMD wont work for me -.- - DaRkAnGeL[NBK] - 11.10.2011

pawn Код:
CMD:setvip(playerid, params[])
{
    if(IsPlayerAdmin(playerid))
    {
        new id, level;
        if(sscanf(params,"ui", id, level)) return SendClientMessage(playerid, -1,"SYNTAX: /setvip [id] [level]");
        {
            PlayerInfo[id][pVIP] = level;
            if (id == INVALID_PLAYER_ID) { return SendClientMessage(playerid, -1, "No player online with that id."); }
        }
    }
    else SendClientMessage(playerid, -1,"You are not an Admin!");
    return 1;
}
==
Код:
 no motherfukin errors thank you so much man



Re: GRRRRRRRR ZCMD wont work for me -.- - DaRkAnGeL[NBK] - 11.10.2011

yet it didnt work in game -.-