Showing Rules CMD
#1

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

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.
Reply
#3

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;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)