Team only aviable for good players... how to...? >.<
#1

Hey guys, it's me again: the stupid scripter xD
Today i have a question about some strange...
I have a Team, that should be only aviable for players with over 1000 score... but if a player with less than 1000 score chooses it, he get spawned at LV (the place you get spawned if you don't have any spawn places) with interioe at 10 and 2 weaps...
I don't know, how to edit that, the caracter looks like this:
OnPlayerRequestClass:
Код:
case 12:
	{
	if(GetPlayerScore(playerid) >= 999)
	{
		GameTextForPlayer(playerid, "~r~~h~Master of War", 1000, 3);
		SetPlayerColor(playerid,red);
		SetPlayerTeam(playerid,3);
		GetPlayerPos(playerid, x, y, z);
		CreateExplosion(x, y , z, 7,10.0);
	}
	else
	{
	    SendClientMessage(playerid,red,"This Team is only for Master of Wars! Get 1000 Score to be able to choose it!");
	}
And the spawn info looks like this:
OnPlayerSpawn:
Код:
else if(GetPlayerTeam(playerid) == 3)
	{
	    if(GetPlayerScore(playerid) >= 999)
	    {
			SetPlayerInterior(playerid, 0);
			SetPlayerHealth(playerid, 100);
			SetPlayerArmour(playerid, 50);
			GivePlayerWeapon(playerid, 18, 10);
			GivePlayerWeapon(playerid, 27, 140);
			GivePlayerWeapon(playerid, 31, 1000);
			GivePlayerWeapon(playerid, 35, 30);
			GivePlayerWeapon(playerid, 39, 10);
			GivePlayerWeapon(playerid, 45, 1);
			SetPlayerPos(playerid,-250.9760,2602.8315,62.8582);
			SetPlayerFacingAngle(playerid,359.6967);
			SetPlayerColor(playerid, red);
			SetPlayerTeam(playerid,3);
		}
		else
		{
            ForceClassSelection(playerid);
            SetPlayerHealth(playerid,0.0);
            SetPlayerArmour(playerid,0.0);
            ResetPlayerWeapons(playerid);
		}


	}
I don't know what's wrong, but anything isn't working here >.<
I think, it would be the best thing, if if the player with less than 1000 score wants to choose that class, he will click "spawn" and nothing happens, only that message apears at chat >.<

Can anyone help me,please?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)