30.10.2010, 15:25
numargs shows the number of arguments
getarg gets the argument value
setarg sets the argument value
If you have a function like
and you call it like this
numargs() is 4
getarg(0) is playerid
getarg(1) is 45
getarg(2) is 1235
getarg(3) is 789 (because number = 789)
setarg(3, 0, 123) sets 'number' to 123
There is also an example on the wiki
https://sampwiki.blast.hk/wiki/ResetPlayerWeaponsEx
getarg gets the argument value
setarg sets the argument value
If you have a function like
pawn Код:
SetPlayerData(playerid, ...)
pawn Код:
new number = 789;
SetPlayerData(playerid, 45, 1235, number);
getarg(0) is playerid
getarg(1) is 45
getarg(2) is 1235
getarg(3) is 789 (because number = 789)
setarg(3, 0, 123) sets 'number' to 123
There is also an example on the wiki
https://sampwiki.blast.hk/wiki/ResetPlayerWeaponsEx