30.04.2010, 19:23
Quote:
Originally Posted by Jefff
Код:
if(!strcmp(cmd, "/changename", true)) { if(!logged[playerid]) return SendClientMessage(playerid, COLOR_RED, "SERVER: You Are Not Logged In"); tmp = strtok(cmdtext,idx); if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_YELLOW, "USAGE: /changename [newname]"); GetPlayerName(playerid, playername, sizeof(playername)); if(fexist(udb_encode(playername))) { if(!fexist(udb_encode(tmp))) { SetPlayerName(playerid, tmp); frename(udb_encode(playername),udb_encode(tmp)); format(string, sizeof(string), "%s has changed his/her name to %s.",playername, tmp); SendClientMessageToAll(COLOR_YELLOW, string); format(string, sizeof(string), "You have succesfully changed your name to %s.", tmp); SendClientMessage(playerid, COLOR_GREEN, string); }else SendClientMessage(playerid, COLOR_GREEN, "This name is already in use"); }//else SendClientMessage(playerid, COLOR_GREEN, "You dont have account"); return 1; } |
I use dudb and i tried adding this into my script, compiled without errors but when i go in game and type /changename Jeff nothing happens.