skin going to deault after death
#1

im having a problem with keeping the same skin after death because right now when i die i going to skin 1 CJ
any ideas
many thanks
Reply
#2

Show us your OnPlayerDeath and OnPlayerSpawn callbacks
Reply
#3

Код:
public OnPlayerSpawn(playerid)
{
	if(gPlayerLogged[playerid])
	{
		SetPlayerSpawn(playerid);
		SetPlayerSkin(playerid,PlayerInfo[playerid][pSkin]);
	}
	return 1;
}
Код:
public OnPlayerDeath(playerid, killerid, reason)
{
	new string[128];
	if(IsPlayerConnected(killerid))
	{
	  if(killerid != playerid)
	  {
	   	if(AdminDuty[playerid])
		  {
		    if(!AdminDuty[killerid])
		    {
					KickPlayer(killerid,"System","Killing an administrator on duty with abuse.");
					format(string, sizeof(string), "[INFO:] System has kicked %s, Reason: Killing an administrator on duty with abuse. ", PlayerName(killerid));
					KickLog(string);
				}
		  }
	  	SetPlayerWantedLevelEx(killerid,GetPlayerWantedLevelEx(playerid)+1);
	  }
	}
	return 1;
}

Reply
#4

pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    new string[128];
    PlayerInfo[playerid][pSkin] = GetPlayerSkin( playerid );
    if(IsPlayerConnected(killerid))
    {
      if(killerid != playerid)
      {
        if(AdminDuty[playerid])
          {
            if(!AdminDuty[killerid])
            {
                    KickPlayer(killerid,"System","Killing an administrator on duty with abuse.");
                    format(string, sizeof(string), "[INFO:] System has kicked %s, Reason: Killing an administrator on duty with abuse. ", PlayerName(killerid));
                    KickLog(string);
                }
          }
        SetPlayerWantedLevelEx(killerid,GetPlayerWantedLevelEx(playerid)+1);
      }
    }
    return 1;
}
Reply
#5

I`d suggest you however to assign the skinvalue somewhere else and not each time again when a player dies.
Reply
#6

thankyou for you information will try this now will update you if it works

and again many thanks for you help n kindness
Reply
#7

Many thats works perfectly hope i can return the fav one day.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)