Disable player spawn button -
MarinacMrcina - 05.06.2012
I want to know how to disable the "Spawn" button when the player is watching the tutorial.
Код:
if(PInfo[playerid][Tutorial]==0)
Re: Disable player spawn button -
milanosie - 05.06.2012
TogglePlayerSpectating(playerid, 1);
At the end of the tut, TogglePlayerSpectating(playerid, 0);
Re: Disable player spawn button -
mahdi499 - 05.06.2012
If(PInfo[playerid][Tutorial]==0)
{
TogglePlayerSpectating(playerid, 1);
}
else if(pInfo[playerid][Tutorial]==1)
{
TogglePlayerSpectating(playeridid, 0);
}
Re: Disable player spawn button -
MarinacMrcina - 05.06.2012
And how can I spawn the player automaticly so he doesn't need to click the "Spawn" button?
Re: Disable player spawn button -
spedico - 05.06.2012
SpawnPlayer(playerid);
Re: Disable player spawn button -
MarinacMrcina - 05.06.2012
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;
}
}
Re: Disable player spawn button -
milanosie - 05.06.2012
If u toggleplayerspectating 0 it automatically spawns him/her
Re: Disable player spawn button -
MarinacMrcina - 05.06.2012
Quote:
Originally Posted by milanosie
If u toggleplayerspectating 0 it automatically spawns him/her
|
Can you put that in my script please
Re: Disable player spawn button -
milanosie - 05.06.2012
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,