/vcmds help
#1

[/pawn]COMMAND:vcmds(playerid,params[])
{
SendAdminText(playerid, "/credits", params);
new show[400];
format(show,sizeof(show),"{FFFFFF}/vfuel\n{FFFFFF}/vrepair\n{FFFFFF}/vfly\n{FFFFFF}/vsetskin");
ShowPlayerDialog(playerid, 110, DIALOG_STYLE_MSGBOX, "{FFFFFF}>>VIP Commands",show, "Close", "");
return 1;
}[/pawn]

How to make as if only vips can see it ?
ty.
Reply
#2

pawn Код:
#define CANT_USE_CMD "You are not allowed to use this command!"

COMMAND:vcmds(playerid,params[])
{
if(PlayerInfo[playerid][vip] < 1) return SendClientError(playerid, CANT_USE_CMD);
SendAdminText(playerid, "/credits", params);
new show[400];
format(show,sizeof(show),"{FFFFFF}/vfuel\n{FFFFFF}/vrepair\n{FFFFFF}/vfly\n{FFFFFF}/vsetskin");
ShowPlayerDialog(playerid, 110, DIALOG_STYLE_MSGBOX, "{FFFFFF}>>VIP Commands",show, "Close", "");
return 1;
}
Reply
#3

@AzaMx: You are going to confuse him with SendClientError.

Use this;
pawn Код:
COMMAND:vcmds(playerid,params[])
{
    if(pInfo[playerid][VIP] > 1) // Change this to your settings
    {
        SendAdminText(playerid, "/credits", params);
        new show[400];
        format(show,sizeof(show),"{FFFFFF}/vfuel\n{FFFFFF}/vrepair\n{FFFFFF}/vfly\n{FFFFFF}/vsetskin");
        ShowPlayerDialog(playerid, 110, DIALOG_STYLE_MSGBOX, "{FFFFFF}>>VIP Commands",show, "Close", "");
    }
    else return SendClientMessage(playerid, -1, "You are not authorized to use this command");
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)