[Ayuda] Problema rarisimo con gm
#5

Este es el comando para comprar el vehiculo:
Код:
zcmd(cvehiculo, playerid, params[]){
 	    if(PlayerInfo[playerid][pLevel] < 2) return Message(playerid, COLOR_RED2, "Debes ser como mнnimo nivel 2");
		new newcar = GetPlayerVehicleID(playerid), idcar = GetPlayerVehicleID(playerid);
 	    if(CarInfo[idcar][cOwned] == 1) return Message(playerid, COLOR_RED2, "El vehнculo no estб en venta.");
 	    if(PlayerInfo[playerid][pPcarkey] != 9999) return Message(playerid, COLOR_RED2, "Ya posees un vehнculo.");
        if(!IsAnOwnableCar(newcar)) return Message(playerid, COLOR_RED2, "Este vehнculo no estб en venta.");
   	    if(GetPlayerMoney(playerid) >= CarInfo[idcar][cValue]){
            ShowPlayerDialog(playerid, IMPORTAR_MOTOR, DIALOG_STYLE_LIST, "Elegir prestaciones", "Motor sin plomo 95\t\tCapacidad: 100l (1$/l)\nMotor sin plomo 98\t\tCapacidad: 120l (1$/l)\nMotor Diesel\t\tCapacidad: 160l (2$/l)\nMotor Biodiesel\t\tCapacidad: 230l (3$/l)", "Instalar", "Salir");
            PlayerInfo[playerid][pPcarkey] = idcar;
            CarInfo[idcar][cVehTime] = gettime() + 1296000;
            PlayerInfo[playerid][pTimeCar] = gettime() + 1296000;
            CarInfo[idcar][cOwned] = 1;
            CarInfo[idcar][cBattery] = 5000;
            strmid(CarInfo[PlayerInfo[playerid][pPcarkey]][cOwner], PlayerName(playerid), 0, strlen(PlayerName(playerid)), 32);
            Bought(playerid, CarInfo[PlayerInfo[playerid][pPcarkey]][cValue]);
            SetVehicleParamsEx(idcar, 0,0,0,0,0,0,0);
            gEngine[playerid] = 0;
            engineOn[idcar] = false;
            ClearChatbox(playerid, 10);
            Message(playerid, COLOR_GREEN, "Felicidades! Has adquirido este vehнculo, utiliza (/v [item])");
            Message(playerid, COLOR_GREEN, "MUY IMPORTANTE: {FFFFFF}Utiliza /tiempoveh para mas informacion sobre tu vehнculo.");
            strmid(CarInfo[idcar][cPlate], "00000", 0, strlen("00000"), 255);
            SetVehicleNumberPlate(idcar, CarInfo[idcar][cPlate]);
            UpdateCars();
            new ownvehkey = PlayerInfo[playerid][pPcarkey];
 	        new carsellprice = CarInfo[ownvehkey][cValue] / 4 * 3;
            if(PlayerToPoint(30.0,playerid,544.5143,-1280.5714,17.2482))    Till(6, carsellprice/3);
 			if(PlayerToPoint(30.0,playerid,1045.3408,-905.2751,42.6273))    Till(7, carsellprice/3);
	    	if(PlayerToPoint(50.0,playerid,2152.0850,-1150.7964,24.1398))   Till(8, carsellprice/3);
	    	if(PlayerToPoint(20.0,playerid,633.4413,-1950.7174,1.6708))     Till(15, carsellprice/3);
	    } else Message(playerid, COLOR_RED2, "ЎNo tienes dinero suficiente!");
	    return 1;
	}
Y este es el de OnPlayerDisconnect:
Код:
public OnPlayerDisconnect(playerid, reason)
{
new welcome[128], nombrewelcome[MAX_PLAYER_NAME], IPwelcome[16];
GetPlayerName(playerid, nombrewelcome, sizeof(nombrewelcome));
GetPlayerIp(playerid, IPwelcome, sizeof(IPwelcome));
format(welcome, 100, "Servidor:{E6E6E6}[ID:%d]{FF0040}%s Ha Salido Del Servidor{FFFFFF}[IP:%s]", playerid, nombrewelcome, IPwelcome );
if (PlayerInfo[playerid][pKey] == 15418665)
{

GetPlayerName(playerid, nombrewelcome, sizeof(nombrewelcome));
GetPlayerIp(playerid, IPwelcome, sizeof(IPwelcome));
format(welcome, 100, "Servidor:{E6E6E6}[ID:%d]{FF0040}%s Ha Salido Del Servidor{FFFFFF}[IP:%s]", playerid, nombrewelcome, IPwelcome );
	SendClientMessage(playerid, COLOR_GREY,welcome);
}
	new string[128];
	SaveGuns(playerid);
	OnPlayerUpdateTime(playerid);

	gActivePlayers[playerid]--;
	numplayers--;

	TextDrawHideForPlayer(playerid, SunGlasses);
	TextDrawHideForPlayer(playerid, BalanceTextDraw[playerid]);
	TextDrawHideForPlayer(playerid, SkinTextDraw[playerid]);
	TextDrawHideForPlayer(playerid, NivelTextDraw[playerid]);
	TextDrawHideForPlayer(playerid, ExperienciaTextDraw[playerid]);
	TextDrawHideForPlayer(playerid, TelefonoTextDraw[playerid]);
	Delete3DTextLabel(Estado[playerid]);
	if(SmokeTimer[playerid]) KillTimer(SmokeTimer[playerid]);
	if(DrugTimer[playerid]) KillTimer(DrugTimer[playerid]);
	if(PlayerInfo[playerid][pPcarkey] != 9999 && PlayerInfo[playerid][pTimeCar] > gettime())
	{
 		SetVehicleVirtualWorld(PlayerInfo[playerid][pPcarkey], PlayerInfo[playerid][pPcarkey]);
	}
	if(PlayerInfo[playerid][pPcarkey2] != 9999 && PlayerInfo[playerid][pTimeCar2] > gettime())
	{
	    SetVehicleVirtualWorld(PlayerInfo[playerid][pPcarkey2], PlayerInfo[playerid][pPcarkey2]);
 	}
	if(PlayerInfo[playerid][pCarPremium] != 9999)
	{
 		SetVehicleVirtualWorld(PlayerInfo[playerid][pCarPremium], PlayerInfo[playerid][pCarPremium]);
	}
	if(HireKey[playerid] != 9999)
	{
	    SetVehicleToRespawn(HireKey[playerid]);
	}
    if(Interview != 0)
	{
		if(strcmp(Interviewer,PlayerName(playerid),true) == 0 )
		{
		    Message(playerid, COLOR_WHITE, "Se cancelу tu entrevista!");
		    Interviewer = "Nadie";
		    Interview = 0;
		}
	}
	if(PaintballType[playerid] > 0)
 	{
 	    switch(PaintballType[playerid])
 	    {
 	    	case 1: TotalDM -= 1;
 	    	case 2: TTeamNaranja -= 1;
 	    	case 3: TTeamVerde -= 1;
 	    	case 4: TotalPlayer -= 1;
 		}
	}
	if(TransportCost[playerid] > 0 && TransportDriver[playerid] < 999)
	{
	    if(IsPlayerConnected(TransportDriver[playerid]))
		{
		    Bought(playerid, TransportCost[playerid]);
			Earn(TransportDriver[playerid], TransportCost[playerid]);
		    format(string, sizeof(string), "~w~Te costo ~r~%d$",TransportCost[playerid]);
		    GameTextForPlayer(playerid, string, 5000, 1);
		    format(string, sizeof(string), "~w~Has ganado ~g~%d$",TransportCost[playerid]);
		    GameTextForPlayer(TransportDriver[playerid], string, 5000, 1);
		    TextDrawHideForPlayer(playerid, Taximeter[playerid]);
			TextDrawHideForPlayer(TransportDriver[playerid], Taximeter[TransportDriver[playerid]]);
			TransportCost[playerid] = 0;    TransportTime[playerid] = 0;    TransportDriver[playerid] = 999;
		}
	}
	if(TaxiCalled[playerid] > 0)
	{
		switch(TaxiCalled[playerid])
		{
			case 1: { TaxiSlot1 = 999; SlotZone1 = "Sin Localizar"; SlotCity1 = "No"; TiempoSlot1 = 0; }
			case 2: { TaxiSlot2 = 999; SlotZone2 = "Sin Localizar"; SlotCity2 = "No"; TiempoSlot2 = 0; }
			case 3: { TaxiSlot3 = 999; SlotZone3 = "Sin Localizar"; SlotCity3 = "No"; TiempoSlot3 = 0; }
			case 4: { TaxiSlot4 = 999; SlotZone4 = "Sin Localizar"; SlotCity4 = "No"; TiempoSlot4 = 0; }
			case 5: { TaxiSlot5 = 999; SlotZone5 = "Sin Localizar"; SlotCity5 = "No"; TiempoSlot5 = 0; }
			case 6: { TaxiSlot6 = 999; SlotZone6 = "Sin Localizar"; SlotCity6 = "No"; TiempoSlot6 = 0; }
			case 7: { TaxiSlot7 = 999; SlotZone7 = "Sin Localizar"; SlotCity7 = "No"; TiempoSlot7 = 0; }
			case 8: { TaxiSlot8 = 999; SlotZone8 = "Sin Localizar"; SlotCity8 = "No"; TiempoSlot8 = 0; }
		}
	}
}
Reply


Messages In This Thread
[Ayuda] Problema rarisimo con gm - by Ivanlamega - 17.02.2015, 22:14
Respuesta: [Ayuda] Problema rarisimo con gm - by Goncho28 - 17.02.2015, 22:20
Respuesta: [Ayuda] Problema rarisimo con gm - by Ivanlamega - 17.02.2015, 22:24
Respuesta: [Ayuda] Problema rarisimo con gm - by Goncho28 - 17.02.2015, 22:29
Respuesta: [Ayuda] Problema rarisimo con gm - by Ivanlamega - 17.02.2015, 22:40
Respuesta: [Ayuda] Problema rarisimo con gm - by Goncho28 - 17.02.2015, 22:57
Respuesta: [Ayuda] Problema rarisimo con gm - by Ivanlamega - 17.02.2015, 23:07
Respuesta: [Ayuda] Problema rarisimo con gm - by Ivanlamega - 17.02.2015, 23:30
Respuesta: [Ayuda] Problema rarisimo con gm - by Goncho28 - 18.02.2015, 00:09
Respuesta: [Ayuda] Problema rarisimo con gm - by Ivanlamega - 18.02.2015, 09:47

Forum Jump:


Users browsing this thread: 1 Guest(s)