11.08.2013, 23:24
Hello im having some trouble with this im trying to make a filterscript that would change your name but im getting this error changename.pwn(22) : warning 203: symbol is never used: "setname"
If anyone can help me or improve it please post you will be rewarded with rep if it works.
Код:
#include <a_samp> CMD:setname(playerid, params[]) { if(PlayerInfo[playerid][Level] >= 6) { new string[128], tmp[256], tmp2[256], Index; tmp = strtok(params,Index), tmp2 = strtok(params,Index); if(isnull(tmp) || isnull(tmp2)) return SendClientMessage(playerid, red, "USAGE: /setname [playerid] [new name]"); if (udb_Exists(tmp2)) return SendClientMessage(playerid,red,"This User Name Is Taken!"); new player1 = strval(tmp); if(PlayerInfo[player1][LoggedIn] == 0) return SendClientMessage(playerid,red,"Player Must Have Account!"); new OldName[24],str[128]; GetPlayerName(player1,OldName,sizeof(OldName)); format(str,sizeof(str),"ladmin/users/%s.sav",OldName); udb_RenameUser(OldName,tmp2); format(str,sizeof(str),"ladmin/users/%s.sav",params); SetPlayerName(player1,tmp2); PlayerPlaySound(player1,1057,0.0,0.0,0.0); format(string, sizeof(string),"Admin ''%s'' Has Changed Your Name To '%s'",PlayerName2(playerid), tmp2); return SendClientMessage(player1,yellow,string); } else return SendClientMessage(playerid,red, "ERROR: Only Level 6 can Use This Command"); }