PDA

View Full Version : Class Request Vehicles in Background


Sting.
30/07/2017, 05:43 PM
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.

mongi
30/07/2017, 05:47 PM
Tried to set the virtual world of the player in ur cmd?
It will remove the cars

Shinja
30/07/2017, 05:55 PM
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)

Sting.
30/07/2017, 06:44 PM
So you suggest I either add it OnPlayerRequestClass or in my command? I will try it out....

Sting.
01/08/2017, 05:30 PM
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?