PlayerSelectClass Problem - 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: PlayerSelectClass Problem (
/showthread.php?tid=86219)
PlayerSelectClass Problem -
burgershot - 12.07.2009
hey, I want to have the GameText show up when a player views a certain skin. This is what I have so far
pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
SetPlayerInterior(playerid,1);
SetPlayerPos(playerid,1.7356,29.3041,1199.5938);
SetPlayerFacingAngle(playerid,1.0432);
SetPlayerCameraPos(playerid, 1.7903,33.1503,1200.5938);
SetPlayerCameraLookAt(playerid, 1.7356,29.3041,1199.5938);
if(classid==12||13)
{
GameTextForPlayer(playerid,"~b~Admin Only Skin",2000,3);
}
else
{
GameTextForPlayer(playerid,"~w~Civilian",2000,3);
}
return 1;
}
It is the same is how I saw it in other scripts BUT "Admin Only Skin" shows up on all of my 14 skins. If I am correct in thinking that the class id is what number id it is (starting with 0) why does this happen? Civilian never shows up.
Thanks In Advance
Re: PlayerSelectClass Problem -
Vince - 12.07.2009
pawn Код:
switch(classid)
{
case 12,13: GameTextForPlayer(playerid,"~b~Admin Only Skin",2000,3);
default: GameTextForPlayer(playerid,"~w~Civilian",2000,3);
}
Re: PlayerSelectClass Problem -
Yuryfury - 12.07.2009
Quote:
Originally Posted by Vince
pawn Код:
switch(classid) { case 12,13: GameTextForPlayer(playerid,"~b~Admin Only Skin",2000,3); default: GameTextForPlayer(playerid,"~w~Civilian",2000,3); }
|
Just wondering, why doesn't the other one work?