License/ID help
#1

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?
Reply
#2

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))
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)