Help me I can make it work.
#1

It's an old command, I did using the old fashion but still....
When the player uses the command it posts an Advertisement but in my case It only posts [Advertisement] and then the name, nothing more, my main aim is to allow text to appear in the advertisement but It doesn't work.
PHP код:
new cmd[256];
new    
tmp[256];
new    
idx;
cmd strtok(cmdtextidx);
if(
strcmp(cmd"/advertise"true) == || strcmp(cmd"/ad"true) == 0)
    {
if(
IsPlayerConnected(playerid))
        {
        
tmp strtok(cmdtext,idx);
        if(!
strlen(tmp) || strlen(tmp) > 5) {
            
SendClientMessage(playerid,0xAFAFAFAA,"Usage: /ad [advertisement] ");
            return 
1;
        }
if(
IsPlayerInRangeOfPoint(playerid501729.6362,-1277.4733,13.5468))
{
new 
Message[128];
 
GivePlayerMoney(playerid, -1000);
 new 
sendername[MAX_PLAYER_NAME];
GetPlayerName(playeridsendernamesizeof(sendername)); // This is for admin name
formatMessagesizeofMessage ), "[Advertisement] %s %s"MessageGetPlayerNameExplayerid )); //No point having two strings vars, as
                
SendClientMessageToAll(0x52ED07FFMessage);
return 
1;
            }
            else { 
SendClientMessage(playerid0xFF4646FF,"You are not at the advertisement building !"); }
        }
        return 
1;
    }
        return 
0;
    } 
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)