19.10.2011, 16:55
pawn Код:
if(strcmp(cmd, "/accent", true) == 0)
{
if(IsPlayerConnected(playerid))
{
new length = strlen(cmdtext);
tmp = strtok(cmdtext, idx);
if(!strval(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "USAGE: /accent [text]");
SendClientMessage(playerid, COLOR_WHITE, "NB! It will show as Name_Name says [Chosenaccent accent]: Mytexthere.");
SendClientMessage(playerid, COLOR_WHITE, "So make sure you make it correct, like Spanish, Russian etc.");
return 1;
}
strmid(PlayerInfo[playerid][pAccent], tmp, 0, strlen(tmp), 255);
format(string, sizeof(string), "You have set your accent to "lblue"%s", PlayerInfo[playerid][pAccent]);
SendClientMessage(playerid, COLOR_WHITE, string);
SavePlayers();
}
return 1;
}