texts!
#1

Hey, can anyone help me please? Just 2 fast questions!

How do I create an /advertise cmd, for example: /ad blalal by NAME phone: xxxxx
or /o chats, /f chats ...

and how do I do TextDraw's, that they display to everyone? I mean, how do I set a position? Some explaination pls!

Greetz
Reply
#2

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.
Reply
#3

i find it rather ironic how you first tells him to not ask for codes but to learn himself.. and then give him the code hes asking for xD
now i really bet he wont come back asking for more codes (oh, that was ironic aswell)
Reply
#4

Quote:
Originally Posted by Lorrden
Посмотреть сообщение
i find it rather ironic how you first tells him to not ask for codes but to learn himself.. and then give him the code hes asking for xD
now i really bet he wont come back asking for more codes (oh, that was ironic aswell)
_______________________
Quote:
Originally Posted by Biesmen
Посмотреть сообщение
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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)