Need Help with SetPlayerPos . -
Rokenzio - 26.01.2012
SetPlayerPos(playerid, PlayerInfo[pLast_x], PlayerInfo[pLasty], PlayerInfo[pLast_z]);
Y u no work

ლ(ಠ益ಠლ
Re: Need Help with SetPlayerPos . -
Universal - 26.01.2012
Lol. Its should be:
pawn Код:
SetPlayerPos(playerid, PlayerInfo[playerid][pLast_x], PlayerInfo[playerid][pLasty], PlayerInfo[playerid][pLast_z]);
Re: Need Help with SetPlayerPos . -
Rokenzio - 26.01.2012
but it's almost the same with my code.
Re: Need Help with SetPlayerPos . -
Universal - 26.01.2012
No its not. You forgot to add the "[playerid]" before the enum variable (or how its called lol).
Re: Need Help with SetPlayerPos . -
Rokenzio - 26.01.2012
but (playerid) is already written almost infront of the code, y do i have to repeat it always?
Re: Need Help with SetPlayerPos . -
Universal - 26.01.2012
The playerid is one of the functions parameters, playerid is basically the ID of the player who will be affected by the function.
Re: Need Help with SetPlayerPos . -
Rokenzio - 26.01.2012
ok, i fikset it, but hou i now my playerid and give my wepons huh?
Re: Need Help with SetPlayerPos . -
Universal - 26.01.2012
Theres a wiki full of functions. There also are plenty of tutorials. But:
pawn Код:
GivePlayerWeapon(playerid, weapon, ammo); // playerid - its the ID of who will receive it
Re: Need Help with SetPlayerPos . -
MP2 - 26.01.2012
Quote:
Originally Posted by Universal
The playerid is one of the functions parameters, playerid is basically the ID of the player who will be affected by the function.
|
First of all it's not a function, it's an array. Secondly, it's a dimension (?), not a parameter.
Quote:
Originally Posted by Rokenzio
but (playerid) is already written almost infront of the code, y do i have to repeat it always?
|
Because how else is the script meant to know what player to do what to/for? It can't read your mind.
"Computers only do what they are programmed to do."
Re: Need Help with SetPlayerPos . -
Universal - 26.01.2012
Quote:
Originally Posted by MP2
First of all it's not a function, it's an array. Secondly, it's a dimension (?), not a parameter.
Because how else is the script meant to know what player to do what to/for? It can't read your mind.
"Computers only do what they are programmed to do."
|
Yes, thats almost what I meant just couldnt find the right words to explain that lol.