/ad command
#8

Try this

PHP код:
COMMAND:ad(playeridparams[])
{
    if (
GetSVarInt(ad_true_msg) == 1)
        return 
SendClientMessage(playerid, -1, !"{CDCDCD}You can't send an advertising message!");    
    if (
sscanf(params"s[128]"params))
        return 
SendClientMessage(playerid, -1, !"{CDCDCD}Syntax: {FFFFFF}/ad [text]");    
    new 
name[MAX_PLAYER_NAME], ad_message[145] = "Advertisement by ";    
    
GetPlayerName(playeridnameMAX_PLAYER_NAME);    
    
strcat(ad_messagename);
    
strcat(ad_message": ");
    
strcat(ad_messageparams);
    
SetSVarInt("ad_true_msg"1);
    
SetTimerEx("@__OnPlayerSendAdMsg"1000*590"s"ad_message);
    
    return 
SendClientMessage(playerid, -1, !"Your message has been sent!");
}
@
__OnPlayerSendAdMsg(message[]); 
@
__OnPlayerSendAdMsg(message[])
{
    
SendClientMessageToAll(0xFFFF00FFmessage);
    
SetSVarInt("ad_true_msg"0);

Write me if there are errors in my example. I have not tested his version
Reply


Messages In This Thread
/ad command - by bugmenotlol - 08.03.2016, 13:32
Re: /ad command - by saffierr - 08.03.2016, 13:46
Re: /ad command - by bugmenotlol - 08.03.2016, 13:58
Re: /ad command - by YouServ - 08.03.2016, 14:51
Re: /ad command - by TheHonnor - 08.03.2016, 16:26
Re: /ad command - by bugmenotlol - 09.03.2016, 02:47
Re: /ad command - by xTURBOx - 09.03.2016, 06:52
Re: /ad command - by Untonyst - 09.03.2016, 10:41
Re: /ad command - by bugmenotlol - 09.03.2016, 13:46
Re: /ad command - by xTURBOx - 09.03.2016, 14:40

Forum Jump:


Users browsing this thread: 1 Guest(s)