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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Skin (
/showthread.php?tid=117081)
Skin -
Lajko1 - 31.12.2009
Hello i am making CIA but how i can make if that player who want to chose CIA skin and he dont have premison for choose that skin it will send him messagew that he cant choose this skin ... and sry for my bad english (premision XD)
ty for any help
Re: Skin -
Deat_Itself - 31.12.2009
use Global variable
Under OnGameModeinit
for e.g CIA skin =
Код:
CIA=AddPlayerClass(265,1958.3783,1343.1572,15.3746,270.1425,0,0,0,0,0,0);
under OnPlayerRequestSpawn
Код:
if(classid == CIA) return SendClientMessage(playerid, COLOR_RED, "you can choose this skin.");
Re: Skin -
Lajko1 - 31.12.2009
Код:
public OnPlayerRequestSpawn(playerid)
{
if (udb_UserInt(PlayerName(playerid), "ciamember") >= 0)
{
if(classid == CIA) return SendClientMessage(playerid, 0xFF9900AA, "You Are Not Cia Member,You Can't Choose This Skin!"); - error line
return 1;
}
return 1;
}
it says error undefined symbol classid...
Re: Skin -
Lajko1 - 31.12.2009
so any help ?
Re: Skin -
Correlli - 31.12.2009
OnPlayerRequestSpawn-callback doesn't have a
classid param, but OnPlayerRequestClass-callback does.
Re: Skin -
Lajko1 - 31.12.2009
but saif say i can put under on player request spawn .... but i think on OnPlayerRequestClass this code wont work,i just want to make if player want to spawn with some CIA skins and he dont have premision for that it will send message that he must chose other skin or something like that ...
Re: Skin -
Deat_Itself - 31.12.2009
Quote:
Originally Posted by Lajko1
but saif say i can put under on player request spawn .... but i think on OnPlayerRequestClass this code wont work,i just want to make if player want to spawn with some CIA skins and he dont have premision for that it will send message that he must chose other skin or something like that ...
|
yeah sorry i forgotten Don Corelli is right .It will work in OnPlayerRequestClass
Re: Skin -
Lajko1 - 03.01.2010
wont work,ty for try but i want , if player want to spawn with this skin it will say this error message... now when i chosing classes and i come to CIA classes it write this message , i want when player press LSHIFT and want to spawn with CIA class it will send him this message
Re: Skin -
Deat_Itself - 03.01.2010
Код:
if (udb_UserInt(PlayerName(playerid), "ciamember") >= 0)
{
if(classid == CIA) return SendClientMessage(playerid, 0xFF9900AA, "You Are Not Cia Member,You Can't Choose This Skin!"); - error line
else
if(classid == CIA && CIAJob)
return 1;
}
untested and CIAjob is your job which you want to add it as CIA
Re: Skin -
Lajko1 - 04.01.2010
ty for try but still not good, listen! Now When i am chossing skins < or > and i come to CIA SKINS it write message ''bla bla ...'' but i want if i am chosing skins it wont nothing happen if i come to CIA skins,but if player want to SPAWN WITH CIA SKIN will send him error message i hope u understand now
ty for help