[help] Skin....
#1

hello there,if i make /sawnoff command and teleport and i add SetPlayerSkin(playerid,55...) how i can make when the player die/leave the /sawnoff to give him back the same skin he had before joining /sawnoff
Reply
#2

I get what you mean. It teleports them to an arena, gives them a skin, and they fight with sawnoffs right? Well if so;

Try saving it into a variable, for example:

Код:
if (strcmp("/sawnoff", cmdtext, true, 10) == 0)
{
    new pskin;
    new Float:pX, Float:pY, Float:pZ;
    pskin = (GetPlayerSkin(playerid));
    GetPlayerPos(playerid,pX,pY,pZ);
    if(pArena[playerid] == NONE)
    {
        SetPlayerSkin(playerid,55);
        SetPlayerPos(playerid,1549.0627,-1675.7617,14.8003);
    }
    else
    {
        SetPlayerPos(playerid,pX,pY,pZ);
        SetPlayerSkin(playerid,pskin);
    }
    return 1;
}
NOTE: This script won't work for you, it is only a base. Some of the variables and such will need to be changed, but the idea should work.
Reply
#3

new oldskin[MAX_PLAYERS];

if(!strcmp(cmdtext, "/sawnoff", true))
{
oldskin[playerid] = GetPlayerSkin(playerid);
SetPlayerSkin(playerid, 55);
return 1;
}

if(!strcmp(cmdtext, "/leave", true))
{
SetPlayerSkin(playerid, oldskin[playerid]);
return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)