Player Must wait to chose skins - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Player Must wait to chose skins (
/showthread.php?tid=180481)
Player Must wait to chose skins -
ZamaXor - 01.10.2010
Hi SA-MP.
How to make so when the player connect he can't choose skins for 10 seconds. When player will connect to the server he will see the first skin but he cant scroll all the skins, he will see only 1 skin, then after 10 sec he can scroll skins.
Tnx for help.
Re: Player Must wait to chose skins -
Ash. - 01.10.2010
pawn Код:
forward ConnectionTimer(playerid);
public ConnectionTimer(playerid)
{
TogglePlayerControllable(playerid, 0);
}
public OnPlayerConnect(playerid)
{
SetTimerEx("ConnectionTimer", 10000, false, "i", playerid);
TogglePlayerControllable(playerid, 1);
return 1;
}
I have no idea if it will work, but its worth a try.
Re: Player Must wait to chose skins -
LarzI - 01.10.2010
After that timer is set, the next line is exectued, so that code wouldn't work.
Correction:
pawn Код:
forward ConnectionTimer(playerid);
public ConnectionTimer(playerid)
{
TogglePlayerControllable(playerid, 1);
}
public OnPlayerConnect(playerid)
{
TogglePlayerControllable(playerid, 0);
SetTimerEx("ConnectionTimer", 10000, false, "i", playerid);
return 1;
}
<This forum requires that you wait 120 seconds between posts. Please try again in 31 seconds.> Argh..
Re: Player Must wait to chose skins -
wups - 01.10.2010
pawn Код:
new bool:CanConnect[MAX_PLAYERS];
public OnPlayerRequestClass(playerid,classid)
{
if(!CanConnect[playerid]) return 0;
return 1;
}
public OnPlayerConnect(playerid)
{
CanConnect[playerid]=false;
SetTimerEx("CanConnec",10*1000,false,"i",playerid);
}
forward CanConnec(playerid);
public CanConnec(playerid) return CanConnect[playerid]=true;
This would be correct
Re: Player Must wait to chose skins -
ZamaXor - 02.10.2010
It works. It sets my screen to other but after 10 sec the player request class not appear.