/ad system
#1

Hey there. I am making simple advertisement system, which allows you to place an advert and let everyone see it like

Usage: /ad [Advertisement text]

Ad system works like this, you write /ad I am selling my house in Ganton, call or sms.
Script will show this

[Advertisement] I am selling my house in Ganton, call or sms, Phone:[2223331]

As we can see there is no FirstName_SureName. I want to create commnd which will allow an admin to see LAST 5 adverts and FirstName_SureName who send them, because otherwise everyone can write whatever they want and not being punished for it because admin cannot see who actually posted it.

I need command which allow me to see last 5 adverts like this:

you type /lastads

"FirstName_Surename placed: "I am selling my house in Ganton, call or sms."

pawn Код:
CMD:ad(playerid, params[])
{
    if(isnull(params))
        return SendClientMessage(playerid, COLOR_LIGHTRED, "(( Koristenje: /ad [advertisement text] ))");
       
    if(strlen(params) > 64)
    {
        va_SendClientMessageToAll(COLOR_GREEN, "[Advertisement] %.64s ...", params);
        va_SendClientMessageToAll(COLOR_GREEN, "... %s, phone[%d]", params[64], PlayerInfo[playerid][pNumber]);
    }
   
    else
        va_SendClientMessageToAll(COLOR_GREEN, "[Advertisement] %s, phone[%d]", params, PlayerInfo[playerid][pNumber]);
       

    return 1;
}
That is my /ad command, I am aware that I have to create fuction which will save that advert and later reveal it under /lastad command.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)