11.08.2009, 08:36
Hey I'm trying to script a /do command for my RP server.
For anyone who isnt used to RP commands, /do is an explenation of the envoriorment.
IE - The trunk has a black create inside it.
I came up with something I think would work but I'm having some problems with it.
Anyone could help me out?
P.S The Code tags made things jump indentations.
For anyone who isnt used to RP commands, /do is an explenation of the envoriorment.
IE - The trunk has a black create inside it.
I came up with something I think would work but I'm having some problems with it.
Код:
public OnPlayerCommandText(playerid, cmdtext[]) { if (strcmp("/do", cmdtext, true, 10) == 0) { if(IsPlayerConnected(playerid)) { if(gPlayerLogged[playerid] == 0) { SendClientMessage(playerid, COLOR_GREY, " You havent logged in yet !"); return 1; } if(!strlen(result)) { SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /do [environment]"); return 1; } format(string, sizeof(string), "* %s %s", sendername, result); ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE); printf("%s", string); } return 1; } return 0; }
P.S The Code tags made things jump indentations.