SERVER and CLIENT variables
#1

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 ?
Reply
#2

nobody here )
Reply
#3

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 ?
Reply
#4

GetPlayerWeaponData is a client-side check I believe.


Its also bugged when it comes to getting players ammo (last i knew)
Reply
#5

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 )
Reply
#6

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
Reply
#7

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..
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)