Quick Question - 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: Quick Question (
/showthread.php?tid=101740)
Quick Question -
Zeromanster - 11.10.2009
Can I use
GetPlayerKeys under
OnPlayerUpdate ? (Im not going to put a lot of code).
Will it create lagg ? Thanks you for you answers.
Re: Quick Question -
iLinx - 11.10.2009
it would be kinda of useless becuase onplayerupdate is removed in samp 0.3 iirc
Re: Quick Question -
Correlli - 11.10.2009
Quote:
Originally Posted by Linx [Stunt Revolution
]
it would be kinda of useless becuase onplayerupdate is removed in samp 0.3 iirc
|
No, it's not.
Re: Quick Question -
iLinx - 11.10.2009
Quote:
Originally Posted by Don Correlli
Quote:
Originally Posted by Linx [Stunt Revolution
]
it would be kinda of useless becuase onplayerupdate is removed in samp 0.3 iirc
|
No, it's not.
|
must of been thinking of something else :/
Re: Quick Question -
Zeromanster - 11.10.2009
And my question ?
Re: Quick Question -
Correlli - 12.10.2009
Quote:
Originally Posted by Zeromanster
And my question ? 
|
Quote:
Originally Posted by Zeromanster
Can I use GetPlayerKeys under OnPlayerUpdate ? (Im not going to put a lot of code).
Will it create lagg ? Thanks you for you answers. 
|
It shouldn't if you don't have too much code there.
Re: Quick Question -
Zeromanster - 12.10.2009
Quote:
Originally Posted by Don Correlli
Quote:
Originally Posted by Zeromanster
And my question ? 
|
Quote:
Originally Posted by Zeromanster
Can I use GetPlayerKeys under OnPlayerUpdate ? (Im not going to put a lot of code).
Will it create lagg ? Thanks you for you answers. 
|
It shouldn't if you don't have too much code there.
|
Thanks.
Re: Quick Question -
Zeromanster - 12.10.2009
Sorry for the double post but is this code okay ?
pawn Код:
public OnPlayerUpdate(playerid)
{
if(IsPlayerConnected(playerid))
{
UpdateCount[playerid] += 1;
if(UpdateCount[playerid] == 3)
{
UpdateCount[playerid] = 0;
OnPlayerPressArrowKeys(playerid);
}
}
return 1;
}
Will this create less lagg because it's three times slower ? Thanks.
Re: Quick Question -
Correlli - 12.10.2009
Like i said, little code shouldn't lag it, and you're not saving anything to a file so i guess it's good. But why do you need IsPlayerConnected check? OnPlayerUpdate will only run for connected players by default sa-mp check.
Re: Quick Question -
Zeromanster - 12.10.2009
Quote:
Originally Posted by Don Correlli
Like i said, little code shouldn't lag it, and you're not saving anything to a file so i guess it's good. But why do you need IsPlayerConnected check? OnPlayerUpdate will only run for connected players by default sa-mp check.
|
Thanks. I deleted IsPlayerConnected.