SA-MP Forums Archive
help in this cmds ty - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: help in this cmds ty (/showthread.php?tid=607874)



help in this cmds ty - Warnin - 25.05.2016

Hi guys ! i need cmds. FOR SATDM.

/rename - to change name without selling stuffs level's vip's level's will be transferred in new name
/orename - offline changingname like /rename
/osetlevel - to set player/admin if player/admin is offline
/fakename


Re: help in this cmds ty - ShadowTeam - 25.05.2016

If we need to changename is must pay?

Sorry for my bad english


Re: help in this cmds ty - ShadowTeam - 25.05.2016

This is command for admin only, admin level 2, u can edit it... using zcmd.inc
Quote:

CMD:changename(playerid, params[])
{
new targetid,name[128];
if(PInfo[playerid][Level] < 2 || !IsPlayerAdmin(playerid)) return 0;
else if (sscanf(params,"us",targetid,name))SendClientMessa ge(playerid,RED,"Usage: /changename [Playerid] [New name]");
else if(!IsPlayerConnected(targetid))SendClientMessage( playerid,RED,"Error: Player is not connected!");
else {
new string[128],n[MAX_PLAYER_NAME];
GetPlayerName(targetid,n,sizeof(n));
SetPlayerName(targetid,name);
format(string,sizeof(string),"Admin %s [ID:%d] Has set %s [ID:%d] name to %s",Name(playerid),playerid,n,targetid,name);
SendClientMessageToAll(YELLOW,string);
format(string,sizeof(string),"Your Name has been set to %s by Admin %s[ID:%d]",Name(targetid),n,playerid);
SendClientMessage(playerid,GREEN,string);
}
return 1;
}




Re: help in this cmds ty - Warnin - 25.05.2016

thanks i will try


Re: help in this cmds ty - Warnin - 25.05.2016

This is not /rename i mean. /rename to change player name to new name without selling stuffs (Cars,house,biz etc.)


Re: help in this cmds ty - ShadowTeam - 25.05.2016

The command is only for admin?


Re: help in this cmds ty - Warnin - 25.05.2016

yes. for rcon only.


Re: help in this cmds ty - Warnin - 25.05.2016

Help me please !


Re: help in this cmds ty - Amunra - 25.05.2016

Quote:
Originally Posted by ShadowTeam
Посмотреть сообщение
This is command for admin only, admin level 2, u can edit it... using zcmd.inc
Your code in Gamemode and his code in his gamemode is different .. you can't just showing your Gamemode Code..
You Must ask him to show his code for make thats code can used ...


Re: help in this cmds ty - TheseMan - 25.05.2016

Quote:
Originally Posted by Warnin
Посмотреть сообщение
Help me please !
Try this

PHP код:
CMD:setname(playerid,params[])
{
    if(
Info[playerid][Level] >= || IsPlayerAdmin(playerid))
    {
        new 
idname[24], str[130], newname;
        if(
sscanf(params"udd"id,name,newname)) return SendClientMessage(playerid,red,"/SetName [Playerid/Name] [New Name]");
        
GetPlayerName(id,name,24);
        
format(str,130,"You Changed %s (%d)'s Name to $%d",name,id,newname);
        
SendClientMessage(playerid,lightblue,str);
        
format(str,130"Admin Changed Your Name to $%d",newname);
        
SendClientMessage(playerid,lightblue,str);
        
SetPlayerName(id,name);
    } else return 
SendClientMessage(playerid,red,"You are not RCON Admin");
    return 
1;