help with changing name
#1

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?
Reply
#2

here you go you can try this


Код:
format(namestring, sizeof(namestring), "GOD";
SetPlayerName(playerid, namestring);
let me know if this helps
Reply
#3

i found this tricky but did it a while ago for a race leader im sure you can adapt my code

Код:
//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);
 	}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)