Skip to content
View in the app

A better way to browse. Learn more.

GTAGames.nl - De Nederlandse Grand Theft Auto Community!

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Zelgespawnde Auto's respawnen.

Wel, standaardvoertuigen die in men gamemode staan gescript respawnen. Duh!

Maar als ik door het spelen zelf voertuigen spawn, respawnen deze ook en dat is heel irritant.

Zeg maar dat het precies standaardvoertuigen worden. Dat is irritant want meestal spawn je een voertuig op een weg en daar komen soms veel spelers. Dat voertuig staat dan in de weg omdat het telkens respawnt.

Kortom, ik wil niet dat die voertuigen die ik zelf spawn respawnen.

	if(strcmp(cmd, "/vehicle", true)==0)
{
	if(!IsPlayerAdmin(playerid)) return 0;
	new giveplayerid;
	new Float:x, Float:y, Float:z;
	tmp = strtok(cmdtext, idx);

	if(!strlen(tmp))
	{
		SendClientMessage(playerid, COLOR_BLUE, "Use: /vehicle [playerid] [vehicleid]");
		return 1;  //Stopt het commando
	}
	giveplayerid = strval(tmp);

	tmp = strtok(cmdtext, idx);
	if(!strlen(tmp))
	{
		SendClientMessage(playerid, COLOR_BLUE, "Use: /vehicle [playerid] [vehicleid]");
	   return 1;  //Stopt het commando
	}
	vehicleid = strval(tmp);

	if(!IsPlayerConnected(giveplayerid))
	{
		SendClientMessage(playerid, COLOR_GREEN, "Player is not online!"); return 1;
	}
	if(vehicleid < 400 || vehicleid > 611)
	{
		SendClientMessage(playerid, COLOR_GREEN, "Use a vehicleid between 400 and 611!"); return 1;
	}
	GetPlayerPos(giveplayerid, x, y, z);
	CreateVehicle(vehicleid, x+5, y+5, z+2, 0.0, -1, -1, 120);
	SendClientMessage(playerid, COLOR_WHITE, "Vehicle gived!");
	SendClientMessage(giveplayerid, COLOR_WHITE, "An admin gave you an vehicle!");
	return 1;
}

Wie kan mij helpen?

Featured Replies

OnVehicleDeath()
{
// als de auto met een command is gespawned, sla dit op in een variabele
{
DestroyVehicle(vehid);
}
}

Dat is het idee in grote lijnen ;)

Langere (of zelfs oneindige) respawn tijd gebruiken.

CreateVehicle(vehicleid, x, y, z, c1, c2, respawntijd);

Je kan bovenaan bij je defines de hex code voor INFINITY toevoegen zodat de auto's nooit meer respawnen.

Helaas heb ik die define nu niet bij de hand omdat ik op locatie ben (zie handtekening). Zodra ik thuis ben edit ik dit bericht wel. :)

Edit: @hierboven: Zo kan het natuurlijk ook. :)

Edited by Big Boss

Je kan natuurlijk ook een combinatie van de twee gebruiken :)

  • Author

Thanx alletwee.

Ik wacht wel tot de 24e, ik kan die hex code nog voor andre dinges gebruiken waar ik al lang op zocht.

Zoals beloofd, hier de hex code voor oneindig:

Als float (bv voor SetPlayerHealth):

#define F_INFINITY (Float:0x7F800000)

Als integer (bv voor respawn tijd):

#define I_INFINITY (0x7F800000)

  • Author

Dus ik zet #define I_INFINITY (0x7F800000) bij de defines.

En I_INFINITY bij createvehicle.

#define COLOR_RED 0xFF0000AA
#define COLOR_GREEN 0x00FF00AA
#define COLOR_BLUE 0x0000FFAA
#define COLOR_WHITE 0xFFFFFFFF
#define COLOR_BROWN 0xA52A2AAA
#define COLOR_GOLD 0xFFD700AA
#define COLOR_FUCHSIA 0xFF00FFAA
#define COLOR_YELLOW 0xFFFF00AA
#define COLOR_GRAY 0x808080AA
#define I_INFINITY (0x7F800000)

CreateVehicle(vehicleid, x+5, y+5, z+2, 0.0, -1, -1, I_INFINITY);

Werkt dus niet bij mij, dat is toch op dezelfde manier als bij kleuren?, snap het niet.

Edited by Freaksken

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.