Multiple spawn locations
#2

You need to get the classid:
pawn Код:
/*Class ID 0*/AddPlayerClass(105,2498.5054,-1684.9028,13.4242,19.7164,24,250,27,250,30,300); // Grove spawn
    /*Class ID 1*/AddPlayerClass(106,2498.5054,-1684.9028,13.4242,19.7164,24,250,27,250,30,300); // Grove spawn
    /*Class ID 2*/AddPlayerClass(107,2498.5054,-1684.9028,13.4242,19.7164,24,250,27,250,30,300); // Grove spawn
    /*Class ID 3*/AddPlayerClass(102,2304.9680,-1652.6714,14.4692,179.8481,24,250,27,250,30,300); // green bottles spawn loc
    /*Class ID 4*/AddPlayerClass(103,2304.9680,-1652.6714,14.4692,179.8481,24,250,27,250,30,300); // green bottles spawn loc
    /*Class ID 5*/AddPlayerClass(104,2304.9680,-1652.6714,14.4692,179.8481,24,250,27,250,30,300); // green bottles spawn loc
Then use that classid, so basically, ballas are class IDs 3-5. Grove classids are 0-2.
pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
    switch(classid)
    {
        case 0..2: //if the class id is 0 to 2, AKA Grove
        {
            SetPlayerPos(playerid, 2498.8213,-1684.5753,13.4179); //Grove position
            SetPlayerCameraPos(playerid, 2497.7188,-1680.2167,13.3547); //Grove camera
            SetPlayerCameraLookAt(playerid, 2498.5054,-1684,13.3547); //Grove position
            SetPlayerFacingAngle (playerid, 12.5838); //Grove angle
        }
        case 3..5: //if the class id is 3 to 5, AKA Ballas
        {
            SetPlayerPos(playerid, X, Y, Z); //Ballas Position
            SetPlayerCameraPos(playerid, X, Y, Z); //Ballas Camera
            SetPlayerCameraLookAt(playerid, X, Y, Z); //Ballas Position
            SetPlayerFacingAngle (playerid, Angle); //Ballas Angle
        }
    }
    return 1;
}
Obviously, replace X, Y and Z with the appropriate coordinates for the Ballas team, and replace Angle with the appropriate facing angle for the ballas team. Hope this kinda helped you understand it.
Reply


Messages In This Thread
Multiple spawn locations - by rymax99 - 20.01.2013, 06:33
Re: Multiple spawn locations - by Threshold - 20.01.2013, 06:39
Re: Multiple spawn locations - by rymax99 - 20.01.2013, 07:10
Re: Multiple spawn locations - by Mr_Zlodei - 20.01.2013, 07:15
Re: Multiple spawn locations - by rymax99 - 20.01.2013, 07:29
Re: Multiple spawn locations - by Mr_Zlodei - 20.01.2013, 07:38

Forum Jump:


Users browsing this thread: 1 Guest(s)