[HELP] Forbid players using certain skins - 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: [HELP] Forbid players using certain skins (
/showthread.php?tid=172328)
[SOLVED] Forbid players using certain skins -
Fredden1993 - 29.08.2010
Hello ya'all.
I'm trying to make a script that stops a player from spawning if he don't got PlayerInfo[playerid][pCopRights] == 1.
And I want this thing to be on OnPlayerRequestSpawn, it should work like this login system:
Код:
if(gPlayerLogged[playerid] == 0)
{
SendClientMessage(playerid, COLOR_LIGHT_RED,"You must login to your account before you can spawn.");
return 0;
}
But when a player tried to select a Cop skin, he should see a message like this and should not be able to use the cop skins if he don't got Cop Rights.
Thanks
Re: [HELP] Forbid players using certain skins -
willsuckformoney - 29.08.2010
if(GetPlayerSkin(playerid) == copskin && copskin2 && copskin3)
{
SetPlayerHealth(playerid,0);
}
work with that
Re: [HELP] Forbid players using certain skins -
Mikkel_Pedersen - 29.08.2010
pawn Код:
public OnPlayerRequestSpawn(playerid)
{
if(PlayerInfo[playerid][pCopRights] != 1)
{
if(GetPlayerSkin(playerid) == [Your Id Skin Here])
{
SendClientMessage(playerid, SOME_COLOR, "You Need To Be A Cop bla bla..);
return 0;
}
}
return 1;
}
Ain't sure if it will work since it isn't tested, but i found a function like this in my script. And i can't compile that since i don't have PlayerInfo and such.
Re: [HELP] Forbid players using certain skins -
CyNiC - 29.08.2010
Yes, using this code in OnPlayerRequestSpawn, will work perfectly, is the best way.