Disable player spawn button
#1

I want to know how to disable the "Spawn" button when the player is watching the tutorial.

Код:
if(PInfo[playerid][Tutorial]==0)
Reply
#2

TogglePlayerSpectating(playerid, 1);


At the end of the tut, TogglePlayerSpectating(playerid, 0);
Reply
#3

If(PInfo[playerid][Tutorial]==0)
{
TogglePlayerSpectating(playerid, 1);
}
else if(pInfo[playerid][Tutorial]==1)
{
TogglePlayerSpectating(playeridid, 0);
}
Reply
#4

And how can I spawn the player automaticly so he doesn't need to click the "Spawn" button?
Reply
#5

SpawnPlayer(playerid);
Reply
#6

Quote:
Originally Posted by spedico
Посмотреть сообщение
SpawnPlayer(playerid);
It only shows the 3 buttons down and does't spawn the player

pawn Код:
stock Login(playerid,key[])
{
    new file[64];
    new name[MAX_PLAYER_NAME];
    GetPlayerName(playerid,name,sizeof(name));
    format(file,sizeof(file),"/users/%s.txt",name);
    if(!strcmp(key,dini_Get(file,"password"),true))
    {
        SendClientMessage(playerid,RED,"Logged in!");
        SpawnPlayer(playerid);// here it is...
        LoadAcc(playerid);
        return 1;
    }
    else
    {
        // bla bla bla retype pass...
        return 1;
    }
}
Reply
#7

If u toggleplayerspectating 0 it automatically spawns him/her
Reply
#8

Quote:
Originally Posted by milanosie
Посмотреть сообщение
If u toggleplayerspectating 0 it automatically spawns him/her
Can you put that in my script please
Reply
#9

How hard is it to place

TogglePlayerSpectating(playerid, 1);

At the OnPlayerRequestClass.


and TogglePlayerSpectating(playerid, 0);


At the login dialog....


EDIT:

dini_Get(file,"password")



You are using flat-file passwords, change it to hash, This is insecure and dangerous,
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)