SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 27/10/2018, 04:39 PM   #1
Zeus666
Gangsta
 
Join Date: Mar 2015
Posts: 676
Reputation: 50
Default GetPlayerVirtualWorld

PHP Code:
        GetPlayerVirtualWorld(targetid) = vw;
        
SetPlayerVirtualWorld(playerid,vw); 
Is this good sintax?
Zeus666 is offline   Reply With Quote
Old 27/10/2018, 05:00 PM   #2
KinderClans
Banned
 
Join Date: May 2018
Location: Italy
Posts: 716
Reputation: 43
Default Re: GetPlayerVirtualWorld

What are you trying to do? 2 lines of code aren't enough to answer your question.
KinderClans is offline   Reply With Quote
Old 27/10/2018, 05:02 PM   #3
Zeus666
Gangsta
 
Join Date: Mar 2015
Posts: 676
Reputation: 50
Default Re: GetPlayerVirtualWorld

Quote:
Originally Posted by KinderClans View Post
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.
Zeus666 is offline   Reply With Quote
Old 27/10/2018, 05:10 PM   #4
SyS
High-roller
 
SyS's Avatar
 
Join Date: Oct 2015
Posts: 1,945
Reputation: 504
Default Re: GetPlayerVirtualWorld

Code:
GetPlayerVirtualWorld(targetid) = vw;
this is wrong the constant shouldn't be at the LHS but at RHS
SyS is offline   Reply With Quote
Old 27/10/2018, 05:23 PM   #5
RogueDrifter
High-roller
 
RogueDrifter's Avatar
 
Join Date: Dec 2017
Location: SA-MP Drifting world.
Posts: 1,193
Reputation: 420
Default Re: GetPlayerVirtualWorld

Quote:
Originally Posted by SyS View Post
Code:
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 Code:
vw = GetPlayerVirtualWorld(targetid);
__________________
Quote:
Originally Posted by Andy
My anti cheat is still relevant *puts shades on* https://github.com/RogueDrifter/Anti_cheat_pack

[Github]:Link [Gists]:Link [Forum]:Link [Server]:Link [Discord]:Link

RogueDrifter is offline   Reply With Quote
Old 27/10/2018, 05:42 PM   #6
Zeus666
Gangsta
 
Join Date: Mar 2015
Posts: 676
Reputation: 50
Default Re: GetPlayerVirtualWorld

Quote:
Originally Posted by RogueDrifter View Post
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 Code:
vw = GetPlayerVirtualWorld(targetid);


Wouldn't be simpler if I just

PHP Code:
        SetPlayerVirtualWorld(playerid,GetPlayerVirtualWorld(targetid)); 
Zeus666 is offline   Reply With Quote
Old 27/10/2018, 05:53 PM   #7
RogueDrifter
High-roller
 
RogueDrifter's Avatar
 
Join Date: Dec 2017
Location: SA-MP Drifting world.
Posts: 1,193
Reputation: 420
Default Re: GetPlayerVirtualWorld

Quote:
Originally Posted by Zeus666 View Post
Wouldn't be simpler if I just

PHP Code:
        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.
__________________
Quote:
Originally Posted by Andy
My anti cheat is still relevant *puts shades on* https://github.com/RogueDrifter/Anti_cheat_pack

[Github]:Link [Gists]:Link [Forum]:Link [Server]:Link [Discord]:Link

RogueDrifter is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Ajuda] GetPlayerVirtualWorld NuTShoT Português/Portuguese 12 28/07/2013 06:47 PM
GetPlayerVirtualWorld park4bmx Help Archive 2 20/07/2011 07:26 PM
SetPlayerVirtualWorld / GetPlayerVirtualWorld tbedy Help Archive 0 22/06/2011 03:08 PM
problem with GetPlayerVirtualWorld Nightrule Help Archive 2 25/07/2010 11:17 AM
GetPlayerVirtualWorld Schock Help Archive 5 15/02/2009 04:10 PM


All times are GMT. The time now is 07:15 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.