01.07.2012, 13:22
in this very simple example, i have included, the angle.. but when i spawn set me the wrong facing angle.. why ? the coordinates are right..
PHP код:
new Float: ExampleRandomSpawn[][4] =
{
{-2796.9854, 1224.8180, 20.5429, 192.0335},
{-2454.2170, 503.8759, 30.0790, 267.2932},
{-2669.7322, -6.0874, 6.1328, 89.8853}
};
PHP код:
public OnPlayerSpawn(playerid)
{
new rand = random(sizeof(ExampleRandomSpawn));
SetPlayerPos(playerid, ExampleRandomSpawn[rand][0], ExampleRandomSpawn[rand][1], ExampleRandomSpawn[rand][2]);
SetPlayerFacingAngle(playerid, ExampleRandomSpawn[rand][3]);
return 1;
}