need help whit CreateVehicle 2 mins destroy
#1

Hi all i been working on my server for like 3 mounth am not best scripter but i have learn alot just by moding server
i downloaded a server here "gamemode" and changed streamer so many times i cant remeber still i want 2 mod main script
with i have done many times butt this is 2 much for me so i need help i got maybe all inc u can get buttt i think sum off the fight em echt other if this is correct plz help me i got massiv object server . i got a shop script from mine server i want to destroy em vehicles
i guess is easy for u scripters butt i must learn how 2 do it basic i wanna destroy my CreateVehicle after 2 mins is like 120 sec i know this
but how 2 add this line 2 my script here is a piece off script not much but were do i put the line under CreateVehicle helpe scripters
Код:
if(CurrentMenu == Planes)
	{
		switch(row)
		{
			 case 0:{
			  TogglePlayerControllable(playerid,1);
				if (GetPlayerMoney(playerid) >= 15000)
				{
				if(IsPlayerInAnyVehicle(playerid))
				{
				TogglePlayerControllable(playerid, 0);
				ShowMenuForPlayer(Planes,playerid);
				SendClientMessage(playerid, 0x33AA33AA, "You are already in a Vehicle.");
				return 1;
				}
				else
				{

				GetPlayerPos(playerid,x,y,z);
				GetPlayerFacingAngle(playerid,a);
				CreateVehicle(519,x+3,y+3,z+2,a,0,1,130);
        PutPlayerInVehicle(playerid, vehicleid2, 0);
				GivePlayerMoney(playerid, -15000);
				SendClientMessage(playerid,COLOR_WHITE,"[SUCCES]> You bought a Shamal for 15000$");
        }
				}
				else
				{
				TogglePlayerControllable(playerid, 0);
				ShowMenuForPlayer(Planes,playerid);
				SendClientMessage(playerid, COLOR_ULTRARED, "You don't have enough moneys! You need 15000$.");
				return 1;code]
Reply
#2

You're English is kinda bad. I don't understand your question. You want it to destroy it if the player leaves it for 2 minutes or destroy it in 2 minutes no matter what?
Reply
#3

CreateVehicle(modelid, x, y, z, colour1, colour2, respawn delay);
just make respawn delay 120. OR you can work with OnPlayerExitVehicle.. But I dont recommend to do that if you are new in pawno. Your english is terrible!
Reply
#4

lol my english is horrible
the thing is i want to destroy the vehicle when player leaves it like when player leav it and dont use it in 2min it gets destroyed not
respawned so my server dont get spammed whit vehicles
Reply
#5

Cant write and test with my phone. Sorry.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)