public OnGameModeExit() { //-----------------------ZOMBIES---------------------------------- AddPlayerClass(230,101.4661,1909.9695,18.3610,277.1736,0,0,0,0,0,0); // AddPlayerClass(33,101.4661,1909.9695,18.3610,277.1736,0,0,0,0,0,0); // //--------------------------------------------------------------// ////Human Skin://///////////---291+43+299------------------------------- AddPlayerClass(291,249.8150,1887.1572,20.6406,61.2849,0,0,0,0,0,0); // AddPlayerClass(43,249.8150,1887.1572,20.6406,61.2849,0,0,0,0,0,0); // AddPlayerClass(299,249.8150,1887.1572,20.6406,61.2849,0,0,0,0,0,0); // //-----------S.T.A.R.S Skin:/--------285+287------------------// AddPlayerClass(285,249.8150,1887.1572,20.6406,61.2849,0,0,0,0,0,0); // AddPlayerClass(287,249.8150,1887.1572,20.6406,61.2849,0,0,0,0,0,0); // //-------------U.C Skin:---294+295------------------------// AddPlayerClass(294,21.9061,-242.7543,2.4126,2.3485,0,0,0,0,0,0); AddPlayerClass(295,21.9061,-242.7543,2.4126,2.3485,0,0,0,0,0,0); //----------Tyrant Skin:------217--------------// AddPlayerClass(217,101.4661,1909.9695,18.3610,277.1736,0,0,0,0,0,0); // return 1; }
public OnPlayerRequestClass(playerid, classid) { SetPlayerPos(playerid, 258.4893,-41.4008,1002.0234); SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746); SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746); return 1; }
OnPlayerRequestSpawn(playerid)
You need the callback
pawn Код:
|
public OnPlayerRequestClass(playerid,classid)
{
SetupPlayerForClassSelection(playerid);
return 1;
}
SetupPlayerForClassSelection(playerid)
{
SetPlayerPos(playerid, 258.4893,-41.4008,1002.0234);
SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
}
OnGameModeExit() |
OnGameModeInit() |
new Float:RandomSpawns[] []=
{
{x, y, z};
};
new rand = random(sizeof(RandomSpawns));
SetPlayerPos(playerid, RandomSpawns[0], RandomSpawns[1], RandomSpawns[2]);
//-----------------------ZOMBIES---------------------------------- AddPlayerClass(230,101.4661,1909.9695,18.3610,277.1736,0,0,0,0,0,0); // AddPlayerClass(33,101.4661,1909.9695,18.3610,277.1736,0,0,0,0,0,0); // //--------------------------------------------------------------// ////Human Skin://///////////---291+43+299------------------------------- AddPlayerClass(291,249.8150,1887.1572,20.6406,61.2849,0,0,0,0,0,0); // AddPlayerClass(43,249.8150,1887.1572,20.6406,61.2849,0,0,0,0,0,0); // AddPlayerClass(299,249.8150,1887.1572,20.6406,61.2849,0,0,0,0,0,0); // //-----------S.T.A.R.S Skin:/--------285+287------------------// AddPlayerClass(285,249.8150,1887.1572,20.6406,61.2849,0,0,0,0,0,0); // AddPlayerClass(287,249.8150,1887.1572,20.6406,61.2849,0,0,0,0,0,0); // //-------------U.C Skin:---294+295------------------------// AddPlayerClass(294,21.9061,-242.7543,2.4126,2.3485,0,0,0,0,0,0); AddPlayerClass(295,21.9061,-242.7543,2.4126,2.3485,0,0,0,0,0,0); //----------Tyrant Skin:------217--------------// AddPlayerClass(217,101.4661,1909.9695,18.3610,277.1736,0,0,0,0,0,0); //
SetPlayerPos(playerid, RandomSpawns[0], RandomSpawns[1], RandomSpawns[2]); //S.T.A.R.S. Spawn points
new Float:STARspawns[] [] =
{
{1234.000, 1223.456, 1212.232},
{2222.222, 3333.333, 444.4444};
}