Say command
#1

The command itself is really explanatory. Here is my code.
PHP код:
[CMD:say(playerid,params[])// /say command
{
     new 
string[128], say[100];// Store the intial action
    
new Float:xFloat:yFloat:z;
    
GetPlayerPos(playeridxyz);
     if(
sscanf(params"s[100]",say)) return SendClientMessage(playerid,COLOR_WHITE,"Usage: /s [Action]");//Error handling
    
for (new 0MAX_PLAYERSi++)
    {
          if (
IsPlayerInRangeOfPoint(i25.0xyz))
          {
             
format(string,sizeof(string),"*%s says\58 \34%s\34",GetName(playerid),say);//Formats the /shout cmd output
             
SendClientMessage(i,COLOR_LIGHTBLUE,string);
        }
          else 
SendClientMessage(playeridCOLOR_SILVER"You spoke but nobody heard you...");
          }
     return 
1;

There are no errors or warnings. However when I type /say I get spammed with "You spoke but nobody heard you..." Any ideas?

Thanks for your time.
Reply


Messages In This Thread
Say command - by Tass007 - 17.07.2016, 11:17
Re: Say command - by oMa37 - 17.07.2016, 11:58
Re: Say command - by TaiRinsuru - 17.07.2016, 12:00
Re: Say command - by Stinged - 17.07.2016, 12:14
Re: Say command - by Tass007 - 18.07.2016, 04:52
Re: Say command - by Stinged - 18.07.2016, 08:55
Re: Say command - by Tass007 - 18.07.2016, 10:41
Re: Say command - by Tass007 - 20.07.2016, 02:09
Re: Say command - by Sew_Sumi - 20.07.2016, 03:20
Re: Say command - by Tass007 - 20.07.2016, 04:17

Forum Jump:


Users browsing this thread: 1 Guest(s)