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



Simple Help - iRemix - 15.05.2010

Hey,

I was wondering if you could help me with a little command. I have done the command before but I have forgotten since It was a long time since I last scripted.

Commands:
[me=Famous']- The usage would be /me [do something]. It should display as Famous enters the bank. [/me]

/shout - The usage would be /shout [shout something]. It should display as Famous Shouts - Hello

It would really help if these commands could be done in DCMD, that it was my script is scripted in.


Re: Simple Help - ViruZZzZ_ChiLLL - 15.05.2010

pawn Код:
dcmd_shout(playerid, params[])
{
    if(!strlen(params)) return SendClientMessage(playerid, 0xFFFFFFAA, "USAGE : /shout [shout message]");
    new string[128];
    GetPlayerName(playerid, string, sizeof(string));
    format(string,sizeof(string),"%s Shouts : %s",params);
    GameTextToAll(string, 5000, 2); // As a GameText for all, but you can change that with SendClientMessageToAll
    return 1;
}

dcmd_me(playerid, params[])
{
  if(!strlen(params)) return SendClientMessage(playerid, 0xFFFFFFAA, "USAGE : /me [message]");
  new string[18];
  GetPlayerName(playerid, string, sizeof(string));
  format(string,sizeof(string),"%s %s", params);
  SendClientMessageToAll(color, string);
  return 1;
}