2 doubts
#1

1-I created a teleport to a derby, the player went into the Derby with a car.
I wonder how do I make the player die if he leaves the car.

Code I used.

Код:
	if(strcmp(cmdtext, "/openderby", true) == 0)
	{
	  if (PlayerInfo[playerid][pAdmin] >= 1)
		{
		  if(!dbon)
			{
			  dbon = true;
			  for(new i; i < MAX_PLAYERS; i++)
				{
	  				GameTextForPlayer(i, "~g~type /goderby",1000,3);
	  			}
			}
			else if(dbon)
			{
			  dbon = false;
			  for(new i; i < MAX_PLAYERS; i++)
				{
	  				GameTextForPlayer(i, "~r~DERBY CLOSED",1000,3);
	  			}
			}
		}
		else
		{
		  SendClientMessage(playerid, COLOR_GRAD1, "  You are not authorized to use this command !");
		}
	}
 if(strcmp(cmdtext, "/GOderby", true) == 0)
	{
    if(!dbon) return SendClientMessage(playerid,0xAA3333AA,"The Event Derby is not released !");
		SetPlayerInterior(playerid,15);
		{
		 LastInterior = GetPlayerInterior(playerid);
	   derbycar = CreateVehicle(444,-1378.8278,991.5210,1024.3533,0.0058,0,0, 600);
     PutPlayerInVehicle(playerid, derbycar, 0);
     ResetPlayerWeapons(playerid);
	   SetPlayerHealth(playerid, 100.0);
	   TogglePlayerControllable(playerid, 1);
	   SetPlayerVirtualWorld(playerid, 0);
	   GameTextForPlayer(playerid,"~r~Derby",2500,3);
		}
   	return 1;
	}
2-The car of that derby is always invisivel.O within normal loads so that the car is invisible, how do I fix this?
Reply
#2

pawn Код:
new derby[MAX_PLAYERS];

//When player enters derby
derby[playerid] = 1;

//OnPlayerExitVehicle
if(derby[playerid] == 1) return SetPlayerHealth(playerid, 0), derby[playerid] = 0;
I think, If not tell me
Reply
#3

2-LinkVehicleToInterior.

If you're using virtual worlds as well, SetVehicleVirtualWorld (Unconfirmed if this is the actual native function)
Reply
#4

Quote:
Originally Posted by Hiddos
2-LinkVehicleToInterior.

If you're using virtual worlds as well, SetVehicleVirtualWorld (Unconfirmed if this is the actual native function)
It is;
https://sampwiki.blast.hk/wiki/SetVehicleVirtualWorld
Reply
#5

the problem is not virtual world.
when I type / setInt 0 (I use to set indoor)
the car appears, so that the map some ...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)