can only choose your saved skin - 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: can only choose your saved skin (
/showthread.php?tid=539341)
can only choose your saved skin -
AmirRFCNR - 27.09.2014
Hey ,
i want when someone request class he can't (show him only his saved skin) and he can spawn only with his saved skin
i have this:
Код:
public OnPlayerRequestClass(playerid, classid)
{
if(PlayerInfo[playerid][Skin] == 1) // If the player has previously saved their skin...
{
SetPlayerSkin(playerid, PlayerInfo[playerid][Skin]);
}
please can some on do it to me
Re: can only choose your saved skin -
amirab - 27.09.2014
try this
PHP код:
public OnPlayerRequestClass(playerid, classid)
{
if(PlayerInfo[playerid][Skin] > -1) // If the player has previously saved their skin...
{
SetPlayerSkin(playerid, PlayerInfo[playerid][Skin]);
}
in OnPlayerConnect use PlayerInfo[playerid][Skin] = -1;
to set it as unknown skin
Re: can only choose your saved skin -
ranme15 - 27.09.2014
PHP код:
public OnPlayerRequestClass(playerid, classid)
{
if(PlayerInfo[playerid][Skin] == classid) // If the player has previously saved their skin...
{
SetPlayerSkin(playerid, PlayerInfo[playerid][Skin]);
return 1;
}
return 0;
}
Re: can only choose your saved skin -
AmirRFCNR - 28.09.2014
SOLVED.
Re : can only choose your saved skin -
AmirRFCNR - 01.10.2014
SOLVED.
Re : can only choose your saved skin -
AmirRFCNR - 02.10.2014
SOLVED.
Re : can only choose your saved skin -
AmirRFCNR - 03.10.2014
SOLVED.
Re: can only choose your saved skin -
Quickie - 04.10.2014
PHP код:
new PlayerInfo[playerid][pSkin]; //make new global var to store player skin
public OnPlayerRequestClass(playerid, classid)
{
if(IsLogged[playerid] == 1)
{
SetPlayerSkin(playerid, PlayerInfo[playerid][pSkin]);
}
return 1;
}
//make a command to save a skin to account
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/saveskin", cmdtext, true, 10) == 0)
{
if(IsLogged[playerid]==1)
{
PlayerInfo[playerid][pSkin]=GetPlayerSkin(playerid);
SendClientMessage(playerid,-1,"Skin Saved");
}
else
{
SendClientMessage(playerid,-1,"You must be logged to save a skin");//print if the player isnt logged
}
return 1;
}
return 0;
}
Re: can only choose your saved skin -
weedxd - 04.10.2014
PHP код:
PlayerInfo[playerid][pModel] = GetPlayerSkin(playerid);
Add this in save char section.
Re : can only choose your saved skin -
AmirRFCNR - 04.10.2014
SOLVED.