30.03.2011, 19:17
Hello is it bossible to make filterscript that adds tag to player name like i create cmd:/settag rcon and then i get tag like [rcon]sMog. i tryed to edit it from "fu" command but i cant i am noob at scripting :
and how to make it save like if player connects it automatically adds tag to player .
PHP код:
CMD:fu(playerid,params[]) {
if(PlayerInfo[playerid][Level] >= 2) {
if(isnull(params)) return SendClientMessage(playerid, red, "USAGE: /fu [playerid]");
new player1 = strval(params), string[128], NewName[MAX_PLAYER_NAME];
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) {
CMDMessageToAdmins(playerid,"FU");
format(NewName,sizeof(NewName),"[%s]oldname", pName(player1) ); SetPlayerName(player1,NewName);
} else return SendClientMessage(playerid, red, "Player is not connected");
} else return SendClientMessage(playerid,red,"ERROR: You are not a high enough level to use this command");
}