SA-MP Forums Archive
Help Scripter ! - 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 Scripter ! (/showthread.php?tid=511519)



Help Scripter ! - DuongNghia - 06.05.2014

Can somebody make me a one commands it. When we type : /nude the skin will changes to skin 252 and type again /nude the skin will return like past and can you make me when we type /nude, the server will run command /me put down the .... and type /nude again server will run the command it /me put in the ... ? Thanks


Re: Help Scripter ! - Roddan - 06.05.2014

Use SetPlayerSkin function and search the guide forum for /me RP Command there are tutorials.

https://sampwiki.blast.hk/wiki/SetPlayerSkin

An Example. It just set your skin it dosen't set you back, idk how to do that im new :P

PHP код:
public OnPlayerCommandText(playeridcmdtext[])
{
    if (
strcmp("/nude"cmdtexttrue10) == 0)
    {
        
SetPlayerSkin(playerid252);
        return 
1;
    }
    return 
0;




Re: Help Scripter ! - itsCody - 06.05.2014

Probably an easier way of doing this

pawn Код:
new pSkin[MAX_PLAYERS];
new NudeSkin[MAX_PLAYERS];

CMD:nude(playerid, params[])
{
    if(NudeSkin[playerid] == 0)
    {
        pSkin[playerid] = GetPlayerSkin(playerid);
        SetPlayerSkin(playerid, 252);
        NudeSkin[playerid] = 1;
    }
   
    else if(NudeSkin[playerid] == 1)
    {
        SetPlayerSkin(playerid, pSkin[playerid]);
        NudeSkin[playerid] = 0;
    }
    return 1;
}