how to make /giverules
#1

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

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(giveid44DIALOG_STYLE_MSGBOX"Rules"string"OK""");
return 
1;

Reply
#3

Plugins: sscanf
Includes: zcmd & sscanf2

Pastebin: http://pastebin.com/PubFbuCE

Enjoy.
Reply
#4

Quote:
Originally Posted by Meller
Посмотреть сообщение
Plugins: sscanf
Includes: zcmd & sscanf2

Pastebin: http://pastebin.com/PubFbuCE

Enjoy.
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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)