20.01.2013, 06:39
You need to get the classid:
Then use that classid, so basically, ballas are class IDs 3-5. Grove classids are 0-2.
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.
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
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;
}