Need Help with SetPlayerPos .
#1

SetPlayerPos(playerid, PlayerInfo[pLast_x], PlayerInfo[pLasty], PlayerInfo[pLast_z]);

Y u no work ლ(ಠ益ಠლ
Reply
#2

Lol. Its should be:
pawn Код:
SetPlayerPos(playerid, PlayerInfo[playerid][pLast_x], PlayerInfo[playerid][pLasty], PlayerInfo[playerid][pLast_z]);
Reply
#3

but it's almost the same with my code.
Reply
#4

No its not. You forgot to add the "[playerid]" before the enum variable (or how its called lol).
Reply
#5

but (playerid) is already written almost infront of the code, y do i have to repeat it always?
Reply
#6

The playerid is one of the functions parameters, playerid is basically the ID of the player who will be affected by the function.
Reply
#7

ok, i fikset it, but hou i now my playerid and give my wepons huh?
Reply
#8

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

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."
Reply
#10

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


Forum Jump:


Users browsing this thread: 1 Guest(s)