How to put a sender name at end of this command
#1

pawn Code:
if(!strcmp(cmdtext, "/advertise", true, 10))
    {
    if(IsPlayerInRangeOfPoint(playerid, 7.0, 362.5211,173.6900,1008.3828))
    {
        new string[248];
        format(string, sizeof string, "*** Advertisement: %s ***", cmdtext[11]);
        SendClientMessageToAll(0x008000FF, string);
        GivePlayerMoney(playerid,-1000);
        return 1;
    }
It needs to look like this:

*** Advertisement: Selling infernus for 50,000$. - Matej_ ***
Reply
#2

pawn Code:
if(!strcmp(cmdtext, "/advertise", true, 10))
    {
    if(IsPlayerInRangeOfPoint(playerid, 7.0, 362.5211,173.6900,1008.3828))
    {
        new string[248],pName[MAX_PLAYER_NAME];
        GetPlayerName(playerid,pName,sizeof(pName));
        format(string, sizeof string, "*** Advertisement: %s [ Contact %s ]***", cmdtext[11],pName);
        SendClientMessageToAll(0x008000FF, string);
        GivePlayerMoney(playerid,-1000);
        return 1;
    }
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)