Command issue
#5

These are the warnings :
PHP код:
es\RP.pwn(505) : error 017undefined symbol "strrest"
C:\Documents and Settings\\My Documents\Downloads\samp03bsvr_R2_win32\gamemodes\RP.pwn(505) : error 033: array must be indexed (variable "tmp")
C:\Documents and Settings\\My Documents\Downloads\samp03bsvr_R2_win32\gamemodes\RP.pwn(800) : warning 203symbol is never used"me" 
And this is the onplayercommand current script :
PHP код:
new cmd[256],idx;
    new 
tmp[256];
    
cmd strtok(cmdtext,idx);
 if(
strcmp(cmd,"/Me",true)==0)
{
new 
string[256];
new 
name[24];
new 
Players LimitGlobalChatRadius(10);
tmp strrest(cmdtext,idx);
if(!
strlen(tmp)) return SendClientMessage(playerid,0xFF6C6CFF,"Usage: /me [action]");
GetPlayerName(playerid,name,sizeof(name));
format(string,sizeof(string)," [Me] %s : %s",name,tmp);
SendClientMessage(Players,0xFFFF00AA,string);
 return 
1;

And this is the script in the bottom of this whole script :
PHP код:
stock ProxDetector(Float:radiplayeridstring[], color)
{
    new 
Float:posxFloat:posyFloat:posz;
    
GetPlayerPos(playeridposxposyposz);
    foreach (
Playeri)
    {
        if(
GetPlayerVirtualWorld(i) == GetPlayerVirtualWorld(playerid))
        {
            if(
IsPlayerInRangeOfPoint(i,radi,posxposyposz))
            {
                
SendClientMessage(icolorstring);
            }
        }
    }
}
stock SendDoingMessage(playeriddoing[])
{
    new 
FloatemoteXFloatemoteYFloatemoteZplayerName[MAX_PLAYER_NAME], msg[128];
    
GetPlayerPos(playeridemoteXemoteYemoteZ);
    
GetPlayerName(playeridplayerNamesizeof(playerName));
    
format(msgsizeof(msg), "* %s %s"playerNamedoing);
    
ProxDetector(30.0playeridmsgCOLOR_PURPLE);
    return 
1;
}
CMD:me(playeridparams[])
{
    new 
result[128];
    if(
sscanf(params"s[128]"result)) return SendClientMessage(playeridCOLOR_GRAD2"USAGE: /me [action]");
    return 
SendDoingMessage(playeridresult);

Reply


Messages In This Thread
Command issue - by Scriptissue - 28.09.2010, 11:57
Re: Command issue - by Voldemort - 28.09.2010, 12:02
Re: Command issue - by DarkPower - 28.09.2010, 12:11
Re: Command issue - by mmrk - 28.09.2010, 12:16
Re: Command issue - by Scriptissue - 28.09.2010, 13:17
Re: Command issue - by <Weponz> - 28.09.2010, 13:42
Re: Command issue - by Scriptissue - 28.09.2010, 15:39
Re: Command issue - by Scenario - 28.09.2010, 16:01
Re: Command issue - by Scriptissue - 29.09.2010, 07:35
Re: Command issue - by samgreen - 29.09.2010, 07:42

Forum Jump:


Users browsing this thread: 2 Guest(s)