#1

Hello!
I do not know how to do business with the Advertiser as interior and when you enter a command to / ad (example) / ad Sell a car! and then in the text above to go Announcement: Sell the car! Contact: Byte_Rodrigez Phone: 5968
please i need it!
Reply
#2

With strtok or sscanf?
Reply
#3

sscanf
Reply
#4

if you help me you have +rep
Reply
#5

This is a Simple script for /ad

pawn Код:
CMD:advertise(playerid, params[])
{
new adv[128];
if(sscanf(params,"s",adv)) return SendClientMessage(playerid, red, "USAGE:/advertise [msg]");
SendClientMessageToAll(playerid, some_color, adv);
return 1;
}
This will be more easier for RP
pawn Код:
CMD:advertise( playerid, params[ ] )
{
    new string[ 128 ], pName[ MAX_PLAYER_NAME ];
    GetPlayerName(playerid, pName, sizeof(pName));
    new item[ 66 ], Price, PH;
    if(sscanf(params, "s[65]dd",item, Price, PH)) return SendClientMessage(playerid, -1, "Usage: /advertise [Item] [Price] [Phone Number]");
    format(string, sizeof(string), "Selling %s for %d$  (Phone Number: %d) %s", item, Price, PH, pName);
    SendClientMessageToAll(-1,string);
    return 1;
}
Reply
#6

where i put it OnPlayerCommandText or ??
Reply
#7

ZMCD
pawn Код:
CMD:ad(playerid, params[])
{
    if(sscanf(params, "s[80]", params))
        return SendClientMessage(playerid, -1, "/ad [message]");

    new VBString[128],VBName[MAX_PLAYER_NAME];
    GetPlayerName(playerid,VBName,MAX_PLAYER_NAME);
    format(VBString,128,"Announcement: %s Contact: %s Phone: %d",params,VBName,PHONE); // Replace PHONE for your phone variable
    SendClientMessageToAll(-1,VBString);
    return true;
}
Reply
#8

thanks you !!!!!!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)