/vcmds 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: /vcmds help (
/showthread.php?tid=530611)
/vcmds help -
Naresh - 08.08.2014
[/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.
Re: /vcmds help -
AzaMx - 08.08.2014
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;
}
Re: /vcmds help -
Affan - 08.08.2014
@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;
}