how to make /giverules - 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: how to make /giverules (
/showthread.php?tid=607661)
how to make /giverules -
RedRex - 22.05.2016
Hello GUys
how to I can make /giverules to Someone Only Admins can Do It ? The Code
Код:
new string[952];
strcat(string, "xTreme Missions Rules:\n\n");
strcat(string, "{020AFD}Cheating, Hacking, Mods[which give you an advantages ovwe other player and bug abusing - {FE0004}Not allowed\n");
strcat(string, "{020AFD}Swearing, Insulting, Spamming And Flooding - {FE0004}Not allowed\n");
strcat(string, "{020AFD}Spawn Killing, Team Jacking and Team Killing - {FE0004}Not allowed\n");
strcat(string, "{020AFD}Parking vehicles to block a path[uniess you directly spawned it into a well] - {0AA61C}Allowed\n");
strcat(string, "{020AFD}{020AFD}Prumium abuse[healing in a fight/fixing you vehicle car while getting shot at and etc] - {FE0004}Not Allowed");
strcat(string, "\n\n");
strcat(string, "{FE0004}Respect Our Scripter: RedRex ");
ShowPlayerDialog(playerid, 44, DIALOG_STYLE_MSGBOX, "Rules", string, "OK", "");
How to I can make it When admin type /giverules ID given a player the rules
Re: how to make /giverules -
SyS - 22.05.2016
PHP код:
CMD:giverules(playerid,params[])
{
new giveid;
if(sscanf(params,"u",giveid)) return SendClientMessage(playerid,-1,"/giverules playerid");
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,-1,"You are not Admin");
new string[952];
strcat(string, "xTreme Missions Rules:\n\n");
strcat(string, "{020AFD}Cheating, Hacking, Mods[which give you an advantages ovwe other player and bug abusing - {FE0004}Not allowed\n");
strcat(string, "{020AFD}Swearing, Insulting, Spamming And Flooding - {FE0004}Not allowed\n");
strcat(string, "{020AFD}Spawn Killing, Team Jacking and Team Killing - {FE0004}Not allowed\n");
strcat(string, "{020AFD}Parking vehicles to block a path[uniess you directly spawned it into a well] - {0AA61C}Allowed\n");
strcat(string, "{020AFD}{020AFD}Prumium abuse[healing in a fight/fixing you vehicle car while getting shot at and etc] - {FE0004}Not Allowed");
strcat(string, "\n\n");
strcat(string, "{FE0004}Respect Our Scripter: RedRex ");
ShowPlayerDialog(giveid, 44, DIALOG_STYLE_MSGBOX, "Rules", string, "OK", "");
return 1;
}
Re: how to make /giverules -
Luicy. - 22.05.2016
Plugins: sscanf
Includes: zcmd & sscanf2
Pastebin:
http://pastebin.com/PubFbuCE
Enjoy.
Re: how to make /giverules -
iKevin - 22.05.2016
Quote:
Originally Posted by Meller
|
You made a mistake. If you're not going to return after the sscanf line you gotta use !sscanf... also u is for playerid in sscanf, not i