/emotion.
#1

Hey, can someone give me a /me command? With a stock so it sends the message only to people in a certain radius.
Reply
#2

For god sake, SEARCH! There are hundreds of roleplay scripts, each with a /me command.
Reply
#3

Quote:
Originally Posted by davelord
View Post
Hey, can someone give me a /me command? With a stock so it sends the message only to people in a certain radius.
Why the second thread. You have already been answered here:

http://forum.sa-mp.com/showthread.ph...=%2Fme+command
Reply
#4

Quote:

C:\Users\Mijn pc\Desktop\NYC\gamemodes\LOCALCHAT.pwn(156) : error 017: undefined symbol "cmd"
C:\Users\Mijn pc\Desktop\NYC\gamemodes\LOCALCHAT.pwn(160) : error 017: undefined symbol "gPlayerLogged"
C:\Users\Mijn pc\Desktop\NYC\gamemodes\LOCALCHAT.pwn(160) : warning 215: expression has no effect
C:\Users\Mijn pc\Desktop\NYC\gamemodes\LOCALCHAT.pwn(160) : error 001: expected token: ";", but found "]"
C:\Users\Mijn pc\Desktop\NYC\gamemodes\LOCALCHAT.pwn(160) : error 029: invalid expression, assumed zero
C:\Users\Mijn pc\Desktop\NYC\gamemodes\LOCALCHAT.pwn(160) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


5 Errors.

Line 160: GetPlayerName(playerid, sendername, sizeof(sendername));
Reply
#5

Show Full command please
Reply
#6

Here. EDIT: took it out the Godfather.
Quote:

//----------------------------------[Emote]-----------------------------------------------
if(strcmp(cmd, "/me", true) == 0)
{
if(IsPlayerConnected(playerid))
{
GetPlayerName(playerid, sendername, sizeof(sendername));
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[64];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /me [action]");
return 1;
}
format(string, sizeof(string), "* %s %s", sendername, result);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPL E,COLOR_PURPLE);
printf("%s", string);
}
return 1;
}

Reply
#7

Have you some command processor (es: zcmd) ?
Reply
#8

Nope.
Reply
#9

Install dcmd
https://sampwiki.blast.hk/wiki/Fast_Commands


and try this
put under OnPlayerCommandText

dcmd(me,2,cmdtext);

pawn Code:
dcmd_me(playerid,params[])
{
    if(!strlen(params)) return SendClientMessage(playerid, RED, "USAGE: /me [action]");
    new string[128],name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, sizeof(name));
    format(string,sizeof(string),"* %s %s",name,params);
    print(string);
    return ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPL E,COLOR_PURPLE);
}
Reply
#10

Got this..
Quote:

C:\Users\Mijn pc\Desktop\NYC\gamemodes\LOCALCHAT.pwn(222) : error 017: undefined symbol "dcmd_me"
C:\Users\Mijn pc\Desktop\NYC\gamemodes\LOCALCHAT.pwn(224) : error 017: undefined symbol "dcmd_me"
C:\Users\Mijn pc\Desktop\NYC\gamemodes\LOCALCHAT.pwn(226) : error 017: undefined symbol "params"
C:\Users\Mijn pc\Desktop\NYC\gamemodes\LOCALCHAT.pwn(226) : error 017: undefined symbol "RED"
C:\Users\Mijn pc\Desktop\NYC\gamemodes\LOCALCHAT.pwn(229) : error 017: undefined symbol "params"
C:\Users\Mijn pc\Desktop\NYC\gamemodes\LOCALCHAT.pwn(231) : error 017: undefined symbol "COLOR_PURPL"
C:\Users\Mijn pc\Desktop\NYC\gamemodes\LOCALCHAT.pwn(231) : error 017: undefined symbol "E"
C:\Users\Mijn pc\Desktop\NYC\gamemodes\LOCALCHAT.pwn(231) : error 029: invalid expression, assumed zero
C:\Users\Mijn pc\Desktop\NYC\gamemodes\LOCALCHAT.pwn(231) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


9 Errors.

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)