PDA

View Full Version : Arrow + button spawn


Polkish
27/02/2018, 09:36 AM
Hello,

I managed to delete the spawn button with TogglePlayerSpectating(playerid, 1); et TogglePlayerSpectating(playerid, 0);

but my automatic spawn does not work and stays on the default view of samp (It works when I remove the script to remove the button)

A solution please? thank you !

AstroPoid
27/02/2018, 09:49 AM
More illustrate, please.
there are a few ways to remove spawn buttons as SetSpawnInfo for example , or force spawn whenever any player connect.
please provide your codes. may we can assist you with your problem

Polkish
27/02/2018, 09:54 AM
That's my way of removing it and making it spawn

public OnPlayerRequestClass(playerid, classid)
{
TogglePlayerSpectating(playerid, 1);
SetSpawnInfo( playerid, 0, 0, 1958.33, 1343.12, 15.36, 269.15, 26, 36, 28, 150, 0, 0 );
SpawnPlayer(playerid);
return 1;
}

public OnPlayerSpawn(playerid)
{
TogglePlayerSpectating(playerid, 0);
new Random = random(sizeof(RandomSpawns));
SetPlayerPos(playerid, RandomSpawns[Random][0], RandomSpawns[Random][1], RandomSpawns[Random][2]);
SetPlayerFacingAngle(playerid, RandomSpawns[Random][3]);
return 1;
}