Need help on Player Connect, Death - 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: Need help on Player Connect, Death (
/showthread.php?tid=421681)
Need help on Player Connect, Death -
Broker - 10.03.2013
hello guys.. i made "new LOL = 0;" .. how to make if 1 player connect the LOL is +1.. ane if player death LOL is -1.. and if LOL = 0, its show "GameTextForPlayer(playerid, "~b~NO LOL", 1000, 3);" ...
Re: Need help on Player Connect, Death -
MP2 - 10.03.2013
https://sampwiki.blast.hk/wiki/OnPlayerConnect
https://sampwiki.blast.hk/wiki/OnPlayerDeath
https://sampwiki.blast.hk/wiki/SetTimerEx
Re: Need help on Player Connect, Death -
Broker - 11.03.2013
yeah.. but, how to make ? LOL +1 on player connect ?
Re: Need help on Player Connect, Death -
YesYesYes - 11.03.2013
I guess you need this
pawn Код:
public OnPlayerConnect
{
LOL++; // adds 1 to the LOL
return 1;
}
public OnPlayerDeath
{
LOL--; //deducts 1 from LOL
if (LOL == 0)
{
//gametext function
}
return 1;
}
Re: Need help on Player Connect, Death -
Broker - 12.03.2013
no work.. but, i make like it :
pawn Код:
public OnPlayerConnect
{
LOL++; // adds 1 to the LOL
return 1;
}
public OnPlayerDeath
{
LOL--; //deducts 1 from LOL
return 1;
}
forward Win(playerid);
public Win(playerid)
{
if (LOL == 0)
{
SendClientMessageToAll(COLOR_RED, "LOL !");
}
return 1;
}
but, no work too..
Re: Need help on Player Connect, Death -
mastermax7777 - 12.03.2013
u calling win? Why u using a timer tho
u dont need "playerid"
Re: Need help on Player Connect, Death -
Broker - 13.03.2013
Quote:
Originally Posted by mastermax7777
u calling win? Why u using a timer tho
u dont need "playerid"
|
no work
Re: Need help on Player Connect, Death -
psychopathe - 13.03.2013
PHP код:
public OnPlayerConnect
{
LOL++; // adds 1 to the LOL
return 1;
}
public OnPlayerDeath
{
LOL--; //deducts 1 from LOL
SetTimer("Win", 1, false);
return 1;
}
forward Win();
public Win()
{
if (LOL == 0)
{
SendClientMessageToAll(COLOR_RED, "LOL !");
}
return 1;
}
Re: Need help on Player Connect, Death -
LarzI - 13.03.2013
Why the hell would you run that timer 1000 times per second? 100 ms per tick is more than enough.
Re: Need help on Player Connect, Death -
Tika Spic - 13.03.2013
Код:
public OnPlayerConnect(playerid)
{
LOL++;
return 1;
}
public OnPlayerDeath(playerid, killerid, reason)
{
LOL--;
if(LOL == 0) { GameTextForAll("No LOL!", 3000, 3); }
return 1;
}
like this maybe?