SA-MP Forums

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

Reply
 
Thread Tools Display Modes
Old 30/07/2017, 05:43 PM   #1
Sting.
Gangsta
 
Sting.'s Avatar
 
Join Date: May 2011
Location: Malaysia
Posts: 815
Reputation: 122
Question Class Request Vehicles in Background

Ok firstly, when the player connects to my server, they go to class request where they select a suitable skin and then they are able to spawn. Well that's not the problem. The problem happens when the player uses my "/changeteam" command, where the player goes back to class request but there will be vehicles in the background which I added, like for example, Grove Street, there are cars all around but when the player connects at first, browsing through classes, there are no cars in the background but when the player uses changeteam and go back to class request, and while browsing through Grove Street class for example, the vehicles will be in the background. Well I checked at other servers and they don't have this.

Well, OnPlayerConnect, I set the player's virtual world to "2".

Then, OnPlayerSpawn, its virtual world is "0".

OnPlayerDeath, there is no virtual world set.

OnPlayerRequestClass, I don't have any virtual world set..... its just SetPlayerInterior(playerid, 0)

At my /changeteam command, I don't use any virtual world. Just goes to ClassSelection.



Conclusion is, I know this seems like a very stupid or useless thread, but then my problem still persists. Anyone have any ideas why the vehicles are in the background? +REP will be rewarded for any response towards solving this minor ridiculous issue. Thanks.
Sting. is offline   Reply With Quote
Old 30/07/2017, 05:47 PM   #2
mongi
Big Clucker
 
Join Date: Jun 2015
Location: Earth
Posts: 109
Reputation: 11
Default Re: Class Request Vehicles in Background

Tried to set the virtual world of the player in ur cmd?
It will remove the cars
__________________
______________________________________________

Offering programming/scripting services. PM for more info.

______________________________________________
[Tool]Server Control Panel
[Tool]Server Control Panel Version 2
[Tool]ChatLog Saver
mongi is offline   Reply With Quote
Old 30/07/2017, 05:55 PM   #3
Shinja
Gangsta
 
Shinja's Avatar
 
Join Date: Jan 2016
Posts: 972
Reputation: 107
Default Re: Class Request Vehicles in Background

When player go ClassSelection from OnPlayerConnect, his vw will be 2, and when he spawn vw will be 0 so when he uses the command /changeteam, nothing changes his vw so he will at ClassSelection on vw 0, so he will see the vehicles those are created on vw 0, also players ect...

So the solution is to set vw again to 2 OnPlayerRequestClass or in your command (if it kill the player, and wont let him playing in vw 2)
Shinja is offline   Reply With Quote
Old 30/07/2017, 06:44 PM   #4
Sting.
Gangsta
 
Sting.'s Avatar
 
Join Date: May 2011
Location: Malaysia
Posts: 815
Reputation: 122
Default Re: Class Request Vehicles in Background

So you suggest I either add it OnPlayerRequestClass or in my command? I will try it out....
Sting. is offline   Reply With Quote
Old 01/08/2017, 05:30 PM   #5
Sting.
Gangsta
 
Sting.'s Avatar
 
Join Date: May 2011
Location: Malaysia
Posts: 815
Reputation: 122
Default Re: Class Request Vehicles in Background

First of all Sorry for DOUBLE post, but I need to bump this thread.

Well guys, I did what you all ask but the problem still persists. Well, I tried all different variations such as,

OnPlayerConnect, VW is set to 1. Then OnPlayerSpawn is set to 0.

I tried with the /changeteam command, setting the VW to 1, but didn't work. No players were in the background (tested) but the vehicles still remained.

I also tried doing it at OnPlayerRequestClass, same result. No players, but Vehicles are there in the Background. Any ideas guys?
Sting. 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] Request Class biell Português/Portuguese 7 01/02/2015 09:57 PM
Request Class Skin X|Dragon|X Scripting Help 2 28/12/2014 07:59 PM
Help me with Request Class Configuration Scripting Help 4 06/04/2013 05:29 PM
[Map] Quick Missions class selection background Twizted Maps 2 01/09/2012 03:54 AM
[FilterScript] Request Class Various | Advance Moving and Change Background ipsBruno Filterscripts 28 22/11/2010 09:16 PM


All times are GMT. The time now is 11:39 AM.


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