Jump to content

i need some ideas about race gamemode


bandi94

Recommended Posts

Hello. Player's on my server said they get bored while waiting after another player's especially when is a longer map

Now i think to do a "Ghost " thing i mean after they died they get respawn in a semy transparent car and they can play but when they reach hunter they get blowed or when only 1 non ghost player remained ghost get blow up and the votemap start i don't wanna change how the race gamemod work.

So i started whit geting spawnpoint position's from map and other stufs now i realized that the race gamemod don't let me to spawn a player after he died (the car get created after i spawn the player and warp into the wehicle) no error but don't spawn and warp so i think the race gamemod block me.

If somebody do this or something similar or you just know how to do it can give me some ideas where to start i mean to unluck respawn and if somethink else need. THX for all :)

Link to comment

RespawnVehicle never worked for me like this. So. This is an idea i thought of, never tested it...

  
[url=http://wiki.multitheftauto.com/wiki/SetElementSpeed]http://wiki.multitheftauto.com/wiki/SetElementSpeed[/url]         (Source Code) 
[url=http://wiki.multitheftauto.com/wiki/GetElementSpeed]http://wiki.multitheftauto.com/wiki/GetElementSpeed[/url]         (Source Code) 
setElementData 
getElementData 
setTimer 
setElementAlpha 
  
onPlayerWasted 

Link to comment

spawnPlayer does work and it automaticly puts player into vehicle for race gamemode, however race has auto spectator script that handels camera, so you need to disable spectating, and do so that players cant spectate a player that has already died and has respawned. Search for isValidPlayer in race resource and you will find that players cant be spectated if their element data

race.finished and race.spectating is true.

To disable spectating, search for Spectate.stop, i wont tell you more.

(you dont actually need to edit race to make it work)

players and that has already died and has respawned will have strange elementAlpha so you need to handle alpha when vehicle changes (or just onClientRender).

Edited by Guest
Link to comment

Solution... Set these settings in the map meta if its race!

        "#respawntime" value="[ 5 ]">
  
        "#respawn" value='[ "timelimit" ]'>

Then if your not a beginner! setTimer ( setElementAlpha, 5500, 1, getPedOccupiedVehicle (thePlayer) , 120 )

Ex...

function wasted() 
setTimer ( setElementAlpha, 5500, 1, getPedOccupiedVehicle (source) , 120 ) 
end 
addEventHandler("onPlayerWasted",getRootElement(),wasted) 

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...