help meh!!1
#1

I looked on wiki, on forums, and on ******, and I still didn't find my answer, so I think I'll ask.

I'm making multiple spots for my classes, but when I go to choose a class, the people are always in the same spot (different types of classes are supposed to have different spawn points). Here's the code:

Код:
public OnPlayerRequestClass(playerid, classid)
{
	pclass[playerid] = classid;
	if(pclass[playerid] == 1 || 2 || 3)
	{
	  SetPlayerInterior(playerid, 0);
		SetPlayerPos(playerid, 2165.2920, -1676.1823, 15.0859);
		SetPlayerCameraPos(playerid, 2164, -1680, 17);
		SetPlayerCameraLookAt(playerid, 2164.2920, -1676.1823, 15.0859);
		GameTextForPlayer(playerid, "~r~Civilian~n~~w~Objective: Live", 3000, 4);
	}
	if(pclass[playerid] == 4 || 5 || 6 || 7 || 8 || 9 || 10 || 11 || 12 || 13)
	{
	  SetPlayerInterior(playerid, 0);
	  SetPlayerPos(playerid, 149.8868, -160.5597, 1.6406);
	  SetPlayerCameraPos(playerid, 150.0, -160.0, 2.0);
	  SetPlayerCameraLookAt(playerid, 149.8868, -160.5597, 1003.6406);
	  GameTextForPlayer(playerid, "~r~Civilian~n~~w~Objective: Live", 3000, 4);
	}
	if(pclass[playerid] == 14 || 15)
	{
	  SetPlayerPos(playerid, 256.4695, 69.9673, 1003.6406);
	  SetPlayerInterior(playerid, 6);
	  SetPlayerCameraPos(playerid, 257.0, 70.0, 1004.0);
	  SetPlayerCameraLookAt(playerid, 256.4695, 69.9673, 1003.6406);
	  GameTextForPlayer(playerid, "~b~Police~n~~w~Objective: Keep Peace", 3000, 4);
	}
	if(pclass[playerid] == 16 || 17 || 18)
	{
	  SetPlayerPos(playerid, 218.8104, -222.7519, 1.5843);
	  SetPlayerInterior(playerid, 0);
	  SetPlayerCameraPos(playerid, 218.0, -223.0, 2.0);
	  SetPlayerCameraLookAt(playerid, 218.8104, -222.7519, 1.5843);
	  GameTextForPlayer(playerid, "~y~Police~n~~w~Objective: Keep Peace", 3000, 4);
	}
	if(pclass[playerid] == 19)
	{
		SetPlayerInterior(playerid, 0);
	  SetPlayerPos(playerid, 1716.9097, -1692.7074, 13.5171);
	  SetPlayerCameraPos(playerid, 1716.0, -1693.0, 14.0);
	  SetPlayerCameraLookAt(playerid, 1716.9097, -1692.7074, 13.5171);
	  GameTextForPlayer(playerid, "~g~Mayor~n~~w~Objective: Control the people~n~~r~Permission required", 5000, 4);
	}
	if(pclass[playerid] == 20 || 21 || 22 || 23)
	{
	  SetPlayerInterior(playerid, 6);
	  SetPlayerPos(playerid, 230.6038, 71.3539, 1005.0392);
	  SetPlayerCameraPos(playerid, 231.0, 72.0, 1006.3);
	  SetPlayerCameraLookAt(playerid, 230.6038, 71.3539, 1005.0392);
	  GameTextForPlayer(playerid, "~p~government agent~n~~w~Objective: Protect VIPs", 3000, 4);
	}
	return 1;
}
:P can someone help meh!?1
Reply
#2

Seems have told you before.
Don't do
Код:
if(a == 1 || 2 || 3)
You must do
Код:
if(a == 1 || a == 2 || a == 3)
Reply
#3

you never told me that before :P

but im soooo laaaazy

thanks
Reply
#4

well it still doesn't work... same problem, even with the change
Reply
#5

Quote:
Originally Posted by Annihalation
well it still doesn't work... same problem, even with the change
New code?
Reply
#6

nvm its working now, forgot to restart the server :P silly me

<-- is a nub
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)