Arrow + button spawn - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Arrow + button spawn (
/showthread.php?tid=650401)
Arrow + button spawn -
Polkish - 27.02.2018
Hello,
I managed to delete the spawn button with
Quote:
TogglePlayerSpectating(playerid, 1);
|
et
Quote:
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 !
Re: Arrow + button spawn -
AstroPoid - 27.02.2018
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
Re: Arrow + button spawn -
Polkish - 27.02.2018
That's my way of removing it and making it spawn
Quote:
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;
}
|
Quote:
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;
}
|