donor 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: donor skin (
/showthread.php?tid=504076)
donor skin -
1fret - 01.04.2014
I need to make a skin thats for donors only so if im not a donor i cant spawn with that skin and it would send a message saying you need to be a donor to use this skin can someone help me or send me a link to an tutorial please
Re: donor skin -
MattTucker - 01.04.2014
pawn Код:
new donor[MAX_PLAYERS];
CMD:skin(playerid, params[])
{
if(donor[playerid]==1)
{
SetPlayerSkin(playerid, /*type in the skin id you want*/);
}
else return SendClientMessage(playerid, -1, "You are not a donor.");
return 1;
}
Re: donor skin -
1fret - 02.04.2014
Thanks for tje reply but I wasn't talking about an command. I ment onplayerrequestspawn
Re: donor skin -
1fret - 02.04.2014
Bump
Re: donor skin -
Flake. - 02.04.2014
Quote:
Originally Posted by 1fret
Thanks for tje reply but I wasn't talking about an command. I ment onplayerrequestspawn
|
Pretty much exactly the same code..
pawn Код:
//Top of script, making a global variable
new donor[MAX_PLAYERS];
//Under OnGameModeInit/FilterScriptInit
AddPlayerClass(0, 1958.33, 1343.12, 15.36, 269.15, 26, 36, 28, 150, 0, 0); //Just an extra class for the donor spawn
public OnPlayerRequestClass(playerid,classid)
{
if(classid == 3 && donor[playerid] == 1) //Change 3 to what ever class id donor one is
{
//Blah Blah Success
}
SendClientMessage(playerid, COLOR_RED, "This skin is only for donors!"); //The failure message
return 1;
}
It should work although I haven't tested it..
Re: donor skin -
1fret - 03.04.2014
Thanks man
Re: donor skin -
1fret - 05.04.2014
doesnt work
Re: donor skin -
1fret - 06.04.2014
Bump