skin going to deault after death - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: skin going to deault after death (
/showthread.php?tid=124707)
skin going to deault after death -
02manchestera - 31.01.2010
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
Re: skin going to deault after death -
kLx - 31.01.2010
Show us your OnPlayerDeath and OnPlayerSpawn callbacks
Re: skin going to deault after death -
02manchestera - 31.01.2010
Код:
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;
}
Re: skin going to deault after death -
kLx - 31.01.2010
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;
}
Re: skin going to deault after death -
ray187 - 31.01.2010
I`d suggest you however to assign the skinvalue somewhere else and not each time again when a player dies.
Re: skin going to deault after death -
02manchestera - 31.01.2010
thankyou for you information will try this now will update you if it works
and again many thanks for you help n kindness
Re: skin going to deault after death -
02manchestera - 31.01.2010
Many thats works perfectly hope i can return the fav one day.