GM left and right button - 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: GM left and right button (
/showthread.php?tid=639385)
GM left and right button -
StR_MaRy - 16.08.2017
Hey guys i have a simple problem with my 230 lines GM ... that when i register or log in i have those LEFT and RIGHT + Spawn Buttons can you guys help me and give an info how to remove them ? not like delete them cause i know is not possible but i don't want them to apear when someone logs in or register.
My GM:
https://pastebin.com/tEDY0G6X
Re: GM left and right button -
pabloalber84ban - 16.08.2017
OnPlayerRequestClass
PHP код:
public OnPlayerRequestClass(playerid,classid)
{
return 0;
}
OnPlayerRequestSpawn
Make a variable to detect if already logged or needed spawn, and do like:
PHP код:
public OnPlayerRequestSpawn(playerid)
{
if(!PlayerInfo[playerid][VARDETECTSPAWN])
{
SendClientMessage(playerid, -1, "First login to spawn.");
return 0;
}
return 1;
}
To this, replace "VARDETECTSPAWN" with your new value boolean to detect if are spawned.
Re: GM left and right button -
StR_MaRy - 16.08.2017
thx but the thing is i know how to stop that spawn buton to kick them if they press it or something else i just want not to showing to players who log in or register
Re: GM left and right button -
HoussemGaming - 16.08.2017
TogglePlayerSpectating(playerid, 1);
Re: GM left and right button -
StR_MaRy - 16.08.2017
i can't spawn if is 1 and if i add it to 1 then change it to 0 is forcing me to press the spawn button
Re: GM left and right button -
HoussemGaming - 16.08.2017
Quote:
Originally Posted by StR_MaRy
i can't spawn if is 1 and if i add it to 1 then change it to 0 is forcing me to press the spawn button
|
Put the TogglePlayerSpectating within the OnPlayerSpawn
Example : when a player login successfully put the TogglePlayerSpectating just after the data load in dialog a/o Command
Re: GM left and right button -
StR_MaRy - 16.08.2017
i added 1 at OnPlayerRequestClass and 0 under login function and it works fine, thx