SERVER and CLIENT variables - 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: SERVER and CLIENT variables (
/showthread.php?tid=77690)
SERVER and CLIENT variables -
MX_Master - 13.05.2009
There is a function
GetPlayerWeaponData ( playerid, slotid, &weapons, &ammo );
and I want to know which vars it returns by reference - server's or client's ?
I mean do server a query to player's client when this function uses in script OR
GetPlayerWeaponData simply returns server vars for this player ?
Re: SERVER and CLIENT variables -
MX_Master - 13.05.2009
nobody here )
Re: SERVER and CLIENT variables -
Think - 13.05.2009
Quote:
Originally Posted by MX_Master
nobody here )
|
nah there are enough people, but some people (like me) dont know what you mean with:
Quote:
Originally Posted by MX_Master
and I want to know which vars it returns by reference - server's or client's ?
|
Re: SERVER and CLIENT variables -
kaisersouse - 13.05.2009
GetPlayerWeaponData is a client-side check I believe.
Its also bugged when it comes to getting players ammo (last i knew)
Re: SERVER and CLIENT variables -
MX_Master - 13.05.2009
Quote:
Originally Posted by kaisersouse
GetPlayerWeaponData is a client-side check I believe
|
yea, i'm asking exactly about this (server and client-side check), and i don't know how this function really works )
Re: SERVER and CLIENT variables -
Think - 13.05.2009
This might be usefull with it. after this try giving the guns back or w/e you want to do with it.
pawn Code:
//common use: get all weapons and store info in an array containing 13 slots
//first value is weapon id and second is ammo
new weapons[13][2];
for (new i = 0; i < 13; i++)
{
GetPlayerWeaponData(playerid, i, weapons[i][0], weapons[i][1]);
}
src =
https://sampwiki.blast.hk/wiki/GetPlayerWeaponData
Re: SERVER and CLIENT variables -
MX_Master - 13.05.2009

i don't need this info, i just want to know what really server do while executing of this function: sending request to player's client OR just quicly returns server-side variables..