14.11.2017, 20:06
Quote:
At top of script:
Код:
#include <sscanf2> #include <zcmd> Код:
CMD:createplayer(playerid,params[]) { new text[24],string[256]; if(sscanf(params, "s[24]",text)) return SendClientMessage(playerid,-1,"USAGE: /createplayer [name]"); format(string,sizeof(string), "You created %s", text); SendClientMessage(playerid, COLOR_DBLUE, string); SendClientMessage(playerid, COLOR_DBLUE,"A new player has been created"); format(string,sizeof(string), "Welcome %s, enjoy your stay"", text); SendClientMessage(playerid, COLOR_DBLUE, string); switch(SetPlayerName(playerid, text)) { case -1: SendClientMessage(playerid,0xFF0000FF, "Unable to change your name, someone else has that name already!"); case 0: SendClientMessage(playerid, 0xFF0000FF, "You are already known with that name!"); case 1: SendClientMessage(playerid, 0x00FF00FF, "Your name is now changed as you wanted!"); } return 1; } |
Just one more thing, how do I change the color of format(string,sizeof(string), "You created %s", text); to COLOR_LIGHTBLUE cause that's the one I need.
Fucking awesome broski, thank u so much!
EDIT: figured it out. Thanks again