Please, learn the basics of PAWNO scripting first. You
won't learn anything from giveaway's, unless you really can't fix the problem. But for this problem, it's all about basic knowledge.
Anyway, since I'm here to help you, I will help you. For the 'phone' part, you need a phone system. So I'll skip that one.
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[]) // The callback we are using.
{
if(strcmp(cmdtext, "/advertise", true, 10) == 0) { // The /advertise command. For the '10'. We had to count the symbols in /advertise. Which is 10. We are going to use cmdtext.
if(IsPlayerConnected(playerid)) { // if the player who types the command is connected
new string[128], sendername[MAX_PLAYER_NAME]; // Define string and sendername.
if(!strlen(cmdtext[10])) // If the player is NOT using /advertise <text>, it will do the follwoing
{
SendClientMessage(playerid,0xAA3333AA,"USAGE: /advertise <text>");
return 1;
}
// Now the script to send your advertisement.
GetPlayerName(playerid, sendername, sizeof(sendername)); // Get the playername of the one who's using /advertise.
format(string, sizeof(string), "Advertisement: %s ,contact: %s", cmdtext[10], sendername); //%s = string. It will show the string cmdtext(your text) and the playername.
SendClientMessageToAll(0xFF9900AA, string); // Send the client message to everyone with the string we 'formatted' above. the color is orange
}
return 1; // Return the script.
} // Close the script
} // Close the callback
@TextDraws
https://sampwiki.blast.hk/wiki/TextDrawCreate
Good luck. I'm not sure if my script works, if you get errors, please post them.
I might missed a bracket or I added a bracket too much.