SA-MP Forums Archive
License/ID 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: License/ID help (/showthread.php?tid=316113)



License/ID help - sherlock - 05.02.2012

If someone types /license it tells them if they have a license or not:
pawn Код:
if(strcmp(cmd, "/license", true) == 0)
    {
    if(PlayerInfo[playerid][pLicKey] == 1)
    {
    SendClientMessage(playerid,COLOR_RED," You have License!");
    }
    else
    {
    SendClientMessage(playerid,COLOR_RED," You Dont Have License!");
    }
    return 1;
How can I change the cmds to /licence [ID] so someone can check another players licence?


Re: License/ID help - milanosie - 05.02.2012

pawn Код:
if(strcmp(cmd, "/license", true) == 0)
    {
    if(PlayerInfo[playerid][pLicKey] == 1)
    {
    SendClientMessage(playerid,COLOR_RED," You have License!");
    }
    else
    {
    SendClientMessage(playerid,COLOR_RED," You Dont Have License!");
    }
    return 1;
use sscanf and i recommend zcmd instead of strcmp

by:

new id;
if(!sscanf(params, "u", id))