GetPlayerVirtualWorld - 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)
+--- Thread: GetPlayerVirtualWorld (
/showthread.php?tid=660203)
GetPlayerVirtualWorld -
Zeus666 - 27.10.2018
PHP код:
GetPlayerVirtualWorld(targetid) = vw;
SetPlayerVirtualWorld(playerid,vw);
Is this good sintax?
Re: GetPlayerVirtualWorld -
KinderClans - 27.10.2018
What are you trying to do? 2 lines of code aren't enough to answer your question.
Re: GetPlayerVirtualWorld -
Zeus666 - 27.10.2018
Quote:
Originally Posted by KinderClans
What are you trying to do? 2 lines of code aren't enough to answer your question.
|
I'm trying to get target id's virtualworld and set it to playerid.
Re: GetPlayerVirtualWorld -
SyS - 27.10.2018
Код:
GetPlayerVirtualWorld(targetid) = vw;
this is wrong the constant shouldn't be at the LHS but at RHS
Re: GetPlayerVirtualWorld -
RogueDrifter - 27.10.2018
Quote:
Originally Posted by SyS
Код:
GetPlayerVirtualWorld(targetid) = vw;
this is wrong the constant shouldn't be at the LHS but at RHS
|
And to simplify that even more what he's saying is the variable that you want to change it's value should be on the
LEFT HAND SIDE, so if you want
vw to be equal to
GetPlayerVirtualWorld(targetid) then it should be like this:
pawn Код:
vw = GetPlayerVirtualWorld(targetid);
Re: GetPlayerVirtualWorld -
Zeus666 - 27.10.2018
Quote:
Originally Posted by RogueDrifter
And to simplify that even more what he's saying is the variable that you want to change it's value should be on the LEFT HAND SIDE, so if you want vw to be equal to GetPlayerVirtualWorld(targetid) then it should be like this:
pawn Код:
vw = GetPlayerVirtualWorld(targetid);
|
Wouldn't be simpler if I just
PHP код:
SetPlayerVirtualWorld(playerid,GetPlayerVirtualWorld(targetid));
Re: GetPlayerVirtualWorld -
RogueDrifter - 27.10.2018
Quote:
Originally Posted by Zeus666
Wouldn't be simpler if I just
PHP код:
SetPlayerVirtualWorld(playerid,GetPlayerVirtualWorld(targetid));
|
If you're going to
GetPlayerVirtualWorld for
targetid only once then yes, nevertheless he was asking about if it was right to do
GetPlayerVirtualWorld(targetid) = vw; and it clearly isn't.