dimanche 17 juillet 2016

Say command

The command itself is really explanatory. Here is my code.

PHP Code:

[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.

This entry passed through the Full-Text RSS service - if this is your content and you're reading it on someone else's site, please read the FAQ at http://ift.tt/jcXqJW.
Recommended article from FiveFilters.org: Most Labour MPs in the UK Are Revolting.



Say command

Aucun commentaire:

Enregistrer un commentaire