Simple Help
#1

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

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

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)