SA-MP Forums Archive
Showing Rules CMD - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Showing Rules CMD (/showthread.php?tid=68311)



Showing Rules CMD - CJ101 - 09.03.2009

if you played TEAm Neo's, you know what im talking about.

I want a command where i can show the rules to a specific player.

/showrules [playerid]


Re: Showing Rules CMD - FarePak - 09.03.2009

Heres an example, it's not indented by the way I just wrote it from scratch just now.

Код:
new x;

if(strcmp(cmdtext,"/showrules",true)==0)
{
new id, tmp[126], str[126];
tmp = strtok(cmdtext, idx);
id = strval(tmp);
if(!strlen(tmp)) return SendClientMessage(playerid, <color>, "Syntax: /showrules [ID]");
SendClientMessage(id,<color>,"Do not cheat on this server!");
return 1;
}
Not even sure if it'll work, but try it anyway.



Re: Showing Rules CMD - Mikep - 09.03.2009

pawn Код:
if (strcmp("/showrules", cmdtext, true,10) == 0)
{
  if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, 0xFF0000AA, "ERROR: This command is for admins!");
  if(!strlen(cmdtext[10])) return SendClientMessage(playerid, 0xFF0000AA, "Usage: /showrules [ID]");
  new showid;
  showid= strval(tmp);
  if(!IsPlayerConnected(showid)) return SendClientMessage(playerid, 0xFF0000AA, "ERROR: That play is not connected!");
  SendClientMessage(showid,color,"These are the rules blablabla");
  return 1;
}