Quote:
Originally Posted by JaKe Elite
I suggest you use sscanf, strtok is outdated & slow. Anywho here it is, sscanf version.
pawn Код:
CMD:setaccent(playerid, params[]) { if(PlayerInfo[playerid][pAdmin] > 1) { new accent[27], string[128]; if(sscanf(params, "s[27]", accent)) { SendClientMessage(playerid,0xFFFFFFAA,"Usage: /accent {58A624}[ accent name ]{FFFFFF}."); SendClientMessage(playerid,0xFFFFFFAA,"Example: {58A624}/accent Portuguese "); return 1; } if(strlen(accent) <= 6 || strlen(accent) > 26) return cmd_setaccent(playerid, ""); // recall the command /setaccent format(string,sizeof(string),"Accent: You have changed your accent to {58A624}%s.",accent); SendClientMessage(playerid,0xFFFFFFAA,string); strmid(pAccent[playerid],accent,0,sizeof(accent),255); } return 1; }
Also you do not need to use IsPlayerConnected when a player uses a command, it is pretty obvious that the user is online, mmm GF Edit alert?
|
Wow, yours worked fine..But, idk now...I mean, it doesn't say anything when I type regularly...Here's where I found it
http://pastebin.com/8drSMj1s