Change file
#1

I know this is possible but dnt know how..
So i want to make cmd , dcmd witch renames player file and renames player INGAME ....
Reply
#2

You mean SetPlayerName?
Reply
#3

Quote:
Originally Posted by ¤Adas¤
You mean SetPlayerName?
This one too ...

- AdminCMD -
To change player name like
/name [playerid] [name]
there is all scanff etc..

i have login/register dialogs witch crates player file
i want to change playerfile name too when player name is changed in game.. - i wont crate new file..
Reply
#4

sorry idk how to help but u can check this admin script it has : /setname : http://forum.sa-mp.com/index.php?topic=12314.0

Edit : and i have this in ladmin4v2 :
Код:
dcmd_setname(playerid,params[]) {
	if(PlayerInfo[playerid][Level] >= 3 || IsPlayerAdmin(playerid)) {
	  new tmp[256], tmp2[256], Index; tmp = strtok(params,Index), tmp2 = strtok(params,Index);
	  if(!strlen(tmp) || !strlen(tmp2)) return SendClientMessage(playerid, red, "USAGE: /setname [playerid] [new name]");
		new player1 = strval(tmp), length = strlen(tmp2), string[128];
		if(length < 3 || length > MAX_PLAYER_NAME) return SendClientMessage(playerid,red,"ERROR: Incorrect Name Length");
		if(PlayerInfo[player1][Level] == ServerInfo[MaxAdminLevel] && PlayerInfo[playerid][Level] != ServerInfo[MaxAdminLevel]) return SendClientMessage(playerid,red,"ERROR: You cannot use this command on this admin");
    if(IsPlayerConnected(player1) && player1 != INVALID_PLAYER_ID) {
  		format(string, sizeof(string), "You have set \"%s's\" name to \"%s\" ", pName(player1), tmp2); SendClientMessage(playerid,blue,string);
		if(player1 != playerid) { format(string,sizeof(string),"Administrator \"%s\" has set your name to \"%s\" ", pName(playerid), tmp2); SendClientMessage(player1,blue,string); }
		SetPlayerName(player1, tmp2);
  		return OnPlayerConnect(player1);
	  } else return SendClientMessage(playerid,red,"ERROR: Player is not connected");
	} else return SendClientMessage(playerid,red,"ERROR: You are not a high enough level to use this command");
}
________
Marijuana Vaporizer
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)