SA-MP Forums Archive
New Command help - 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: New Command help (/showthread.php?tid=301150)



New Command help - HarrySidwell - 03.12.2011

Hi I'm using VX-RP And i'm wondering if it is Possible to make a /giveadmin [id] [level] Command, And a /setnewbiespawn command, If this is possible would someone mind helping me out by writing the Script line and i'll add it in.
Please


Re: New Command help - Kostas' - 03.12.2011

pawn Код:
// At The Top
#include <a_samp>
#include <zcmd>
#include <sscanf2>

CMD:giveadmin(playerid, params[])
{
    new
        id,
        level;
    if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, "You cannot use this command!");
    if(sscanf(params, "ri", id, level)) return SendClientMessage(playerid, -1, "Usage: /giveadmin [id] [level]");
    if(level > 10 || level < 0) return SendClientMessage(playerid, -1, "ERROR: You can use levels 0 to 10");
    new
        Sstring[128],
        name2[MAX_PLAYER_NAME];
    GetPlayerName(id, name2, sizeof(name2));
    format(Sstring, sizeof(Sstring), "%s (On how it saved)", name2);
    Your_Variable[id][enum of level] = level;
    return 1;
}



Re: New Command help - Mr.Fames - 03.12.2011

why do u need the /setnewbiespawn command for, u can find it in the latest version of VX-RP 2 0.3d