public OnPlayerRequestClass(playerid, classid)
{
SetPlayerInterior(playerid,14);
SetPlayerPos(playerid,258.4893,-41.4008,1002.0234);
SetPlayerFacingAngle(playerid, 270.0);
SetPlayerCameraPos(playerid,256.0815,-43.0475,1004.0234);
SetPlayerCameraLookAt(playerid,258.4893,-41.4008,1002.0234);
}
public OnGameModeInit()
{
// Lets turn off a few things first :)
EnableStuntBonusForAll(0);
SetGameModeText("Trucking World v1.0");
//TEMPLATE: AddPlayerClassEx(teamid, modelid, spawn_x, spawn_y, spawn_z, z_angle, 0, 0, 0, 0, 0, 0);
// Player Class ID 1 == Truckers
AddPlayerClassEx(1, 128, -783.7039872943303, 705.7229784321546, 18.0, 269.15, 0, 0, 0, 0, 0, 0);
AddPlayerClassEx(1, 131, -783.7039872943303, 705.7229784321546, 18.0, 269.15, 0, 0, 0, 0, 0, 0);
AddPlayerClassEx(1, 132, -783.7039872943303, 705.7229784321546, 18.0, 269.15, 0, 0, 0, 0, 0, 0);
AddPlayerClassEx(1, 133, -783.7039872943303, 705.7229784321546, 18.0, 269.15, 0, 0, 0, 0, 0, 0);
AddPlayerClassEx(1, 161, -783.7039872943303, 705.7229784321546, 18.0, 269.15, 0, 0, 0, 0, 0, 0);
AddPlayerClassEx(1, 162, -783.7039872943303, 705.7229784321546, 18.0, 269.15, 0, 0, 0, 0, 0, 0);
AddPlayerClassEx(1, 201, -783.7039872943303, 705.7229784321546, 18.0, 269.15, 0, 0, 0, 0, 0, 0);
AddPlayerClassEx(1, 202, -783.7039872943303, 705.7229784321546, 18.0, 269.15, 0, 0, 0, 0, 0, 0);
// Player Class ID 2 == Assistance
// ID 50
// Player Class ID 3 == Police
// Player Class ID 4 == Unemployed
// End Classes
return 0;
}
public OnPlayerRequestClass(playerid, classid)
{
SetPlayerInterior(playerid,14);
SetPlayerPos(playerid,258.4893,-41.4008,1002.0234);
SetPlayerFacingAngle(playerid, 270.0);
SetPlayerCameraPos(playerid,256.0815,-43.0475,1004.0234);
SetPlayerCameraLookAt(playerid,258.4893,-41.4008,1002.0234);
if(classid == 0)
{
...
}
if(classid == 1)
{
...
}
......
return 1;
}
if(classid == 0)
{
}
if(classid == 7)
{
}
if(classid == NUMBER)
{
HERE??
}
I do intend to add more, so i would just carry on the pattern?
And what goes in pawn Код:
|
if(classid == NUMBER)
{
SetPlayerPos(x, y, z etc)
}
AddPlayerClassEx(teamid, skin, Float:x, Float:y, Float:z, Float:Angle, weapon1, weapon1_ammo, weapon2, weapon2_ammo, weapon3, weapon3_ammo)