23.06.2010, 01:20
i'm making a script that if admin type a command like /god or /duty, their name will be changed to [playerid](god), or (duty), anyone can hellp?
format(namestring, sizeof(namestring), "GOD"; SetPlayerName(playerid, namestring);
//add
new name[MAX_PLAYER_NAME],racename[MAX_PLAYER_NAME];
GetPlayerName(playerid,pname,sizeof(pname));
format(racename,sizeof(racename),"%s[1st]",pname);
SetPlayerName(playerid,racename);
//remove
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid,pname,MAX_PLAYER_NAME);
if(strfind(pname,"[1st]",false,strlen(pname)-5) !=-1) {
strdel(pname,strlen(pname)-5,strlen(pname));
SetPlayerName(a,pname);
}