26.04.2018, 16:23
1. Now I want to make a command to send a message to the player, through a new function:
Example:
2. Here "RESOURCE" I will define for each section
Example:
3. And every define I will format the text in a new stock
Example:
4. And this is what I want, when the function is initialized
I hope everyone will help me, let me finish it.
Example:
Код:
SendTextPlayer(playerid, RESOURCE, color);
Example:
Код:
#define EROR_TEXT 1 #define TEXT_INFO 2 #define TEXT_GUN 3
Example:
Код:
stock TextPlayer(playerid) { new string[128]; case EROR_TEXT: format(string, sizeof(string), "Command incorrect."); case TEXT_INFO: format(string, sizeof(string), "This is Test."); case TEXT_GUN: format(string, sizeof(string), "This is Gun Test."); return 1; }
Код:
SendTextPlayer(playerid, EROR_TEXT, 0xFFFFFFFF); It will send to that player: "Command incorrect"