Class Request Vehicles in Background
#1

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

Tried to set the virtual world of the player in ur cmd?
It will remove the cars
Reply
#3

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)
Reply
#4

So you suggest I either add it OnPlayerRequestClass or in my command? I will try it out....
Reply
#5

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


Forum Jump:


Users browsing this thread: 1 Guest(s)