27.07.2009, 13:49
Caution: May be buggy, I didn't use STRTOK.
Its not tested.
I dont have much hope for it, but good luck hehe
Код:
public OnPlayerCommandText(playerid, cmdtext[]) { if (strcmp("/setage", cmdtext, true, 10) == 0) { new string[18]; if(cmdtext[9] == 0) { SendClientMessage(playerid, COLOR_[color], "Invalid number, /setage 1-99"); return 1; } if(cmdtext[9] != 0) { format(string, sizeof(string), "You are %d years old", cmdtext[9]); SendClientMessage(playerid, COLOR_[color], string); // Set whatever you variables you want to become to players age. return 1; } } return 0; }
I dont have much hope for it, but good luck hehe