GM left and right button
#1

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
Reply
#2

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.
Reply
#3

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
Reply
#4

TogglePlayerSpectating(playerid, 1);
Reply
#5

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
Reply
#6

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
Reply
#7

i added 1 at OnPlayerRequestClass and 0 under login function and it works fine, thx
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)