Private Skin Help - 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: Private Skin Help (
/showthread.php?tid=605492)
Private Skin Help -
Miller007 - 20.04.2016
solved
Re: Private Skin Help -
1nspire - 20.04.2016
if(!(strcmp(SkinName, "Apex", false) == 0))
change to:
if(strcmp(SkinName, "Apex", false) == 0)
Re: Private Skin Help -
Saliim - 20.04.2016
Hi you can use that :
in callback OnPlayerSpawn
Код:
if(strcmp(pname, "Miller007", true) == 0)//here your surname in game
{
SetPlayerSkin(playerid, 100);
return 0;
}
Re: Private Skin Help -
DarkLored - 20.04.2016
You should use it in the callback OnPlayerRequestSpawn because it'll prevent the player from clicking Spawn and using the skin.
Re: Private Skin Help -
Miller007 - 20.04.2016
Quote:
Originally Posted by 1nspire
if(!(strcmp(SkinName, "Apex", false) == 0))
change to:
if(strcmp(SkinName, "Apex", false) == 0)
|
now i can spawn it with other names too :P
Re: Private Skin Help -
Miller007 - 20.04.2016
Thanks guyz i got it
Re: Private Skin Help -
J0sh... - 20.04.2016
PHP код:
public OnPlayerRequestSpawn(playerid)
{
if(GetPlayerSkin(playerid) == 26)
{
new SkinName[MAX_PLAYER_NAME];
GetPlayerName(playerid, SkinName, sizeof(SkinName));
if(!strcmp(SkinName, "Apex", false))
{
SendClientMessage(playerid,red,"This Skin For Apex Only");
return 0;
}
}
return 1;
}
Not sure if it works.
EDIT: Didn't see you solved it, good to here.
OnPlayerRequestClass is when the player switches to a new classid.
OnPlayerRequestSpawn is when the player clicks the spawn button.
Re: Private Skin Help -
J0sh... - 20.04.2016
Del please.