Command Problem!
#1

Sometimes it goes /v. Sometimes it works, sometimes tells me: "You not have vehicles!"
Код HTML:
CMD:v(playerid, params [])
{
    new bool:found = false, msg[256], lst[19];
    msg = "Name\tSts\tPlate";
    for(new i = 0; i < sizeof(Veh); i++)
    {
        if(Veh[i][Owner] == pInfo[playerid][pID])
        {
            found = true;
            if(Veh[i][Lock] == 0) { lst = "{00DR29}Unlocked"; }
            else if(Veh[i][Lock] == 1) { lst = "{AE0000}Locked"; }
            format(msg, sizeof(msg), "%s\n%s\t%s\t%s", msg, g_VehicleNames[GetVehicleModel(Veh[i][ServerID])-400], lst, Veh[i][Plate]);
        }
    }
    if(found) { ShowPlayerDialog(playerid, DIALOG_V, DIALOG_STYLE_TABLIST_HEADERS, "Vehicles", msg, "Select", "Cancel"); }
    else { SendClientMessage(playerid, COLOR_DARKGRAY, "You not have vehicles!"); }
    return 1;
}
Reply
#2

BUMB
Reply
#3

Anyone?
Reply
#4

Код:
CMD:v(playerid, params[], help)
{
	new string[256];
	if(P_Enum[playerid][pe_CarKey] == -1 && P_Enum[playerid][pe_CarKey2] == -1 && P_Enum[playerid][pe_CarKey3] == -1)
	{ GRESKA(playerid, "Nemate nijedno vozilo!"); return 1; }
	else if(P_Enum[playerid][pe_VoziloKljuc] != -1 && P_Enum[playerid][pe_VoziloKljuc2] == -1 && P_Enum[playerid][pe_VoziloKljuc3] == -1)
    {
		format(string,sizeof(string),"%s\nNema Vozila\nNema Vozila", GetVehicleNameEx(C_Enum[P_Enum[playerid][pe_VoziloKljuc]][ce_Model]) );
		ShowPlayerDialog(playerid, DIALOG_VOZILO123, DIALOG_STYLE_LIST, ""COL_WHITE"Vozilo kontrola", string, "Odabir", "Ponisti");
	}
	else if(P_Enum[playerid][pe_VoziloKljuc] == -1 && P_Enum[playerid][pe_VoziloKljuc2] != -1 && P_Enum[playerid][pe_VoziloKljuc3] == -1)
    {
		format(string,sizeof(string),"Nema Vozila\n%s\nNema Vozila", GetVehicleNameEx(C_Enum[P_Enum[playerid][pe_VoziloKljuc2]][ce_Model]) );
		ShowPlayerDialog(playerid, DIALOG_VOZILO123, DIALOG_STYLE_LIST, ""COL_WHITE"Vozilo kontrola", string, "Odabir", "Ponisti");
	}
	else if(P_Enum[playerid][pe_VoziloKljuc] == -1 && P_Enum[playerid][pe_VoziloKljuc2] == -1 && P_Enum[playerid][pe_VoziloKljuc3] != -1)
    {
		format(string,sizeof(string),"Nema Vozila\nNema Vozila\n%s", GetVehicleNameEx(C_Enum[P_Enum[playerid][pe_VoziloKljuc3]][ce_Model]) );
		ShowPlayerDialog(playerid, DIALOG_VOZILO123, DIALOG_STYLE_LIST, ""COL_WHITE"Vozilo kontrola", string, "Odabir", "Ponisti");
	}
	else if(P_Enum[playerid][pe_VoziloKljuc] != -1 && P_Enum[playerid][pe_VoziloKljuc2] != -1 && P_Enum[playerid][pe_VoziloKljuc3] == -1)
    {
		format(string,sizeof(string),"%s\n%s\nNema Vozila", GetVehicleNameEx(C_Enum[P_Enum[playerid][pe_VoziloKljuc]][ce_Model]),GetVehicleNameEx(C_Enum[P_Enum[playerid][pe_VoziloKljuc2]][ce_Model]) );
		ShowPlayerDialog(playerid, DIALOG_VOZILO123, DIALOG_STYLE_LIST, ""COL_WHITE"Vozilo kontrola", string, "Odabir", "Ponisti");
	}
	else if(P_Enum[playerid][pe_VoziloKljuc] != -1 && P_Enum[playerid][pe_VoziloKljuc2] == -1 && P_Enum[playerid][pe_VoziloKljuc3] != -1)
    {
		format(string,sizeof(string),"%s\nNema Vozila\n%s", GetVehicleNameEx(C_Enum[P_Enum[playerid][pe_VoziloKljuc]][ce_Model]),GetVehicleNameEx(C_Enum[P_Enum[playerid][pe_VoziloKljuc3]][ce_Model]) );
		ShowPlayerDialog(playerid, DIALOG_VOZILO123, DIALOG_STYLE_LIST, ""COL_WHITE"Vozilo kontrola", string, "Odabir", "Ponisti");
	}
	else if(P_Enum[playerid][pe_VoziloKljuc] == -1 && P_Enum[playerid][pe_VoziloKljuc2] != -1 && P_Enum[playerid][pe_VoziloKljuc3] != -1)
    {
		format(string,sizeof(string),"Nema Vozila\n%s\n%s", GetVehicleNameEx(C_Enum[P_Enum[playerid][pe_VoziloKljuc2]][ce_Model]),GetVehicleNameEx(C_Enum[P_Enum[playerid][pe_VoziloKljuc3]][ce_Model]) );
		ShowPlayerDialog(playerid, DIALOG_VOZILO123, DIALOG_STYLE_LIST, ""COL_WHITE"Vozilo kontrola", string, "Odabir", "Ponisti");
	}
	else if(P_Enum[playerid][pe_VoziloKljuc] != -1 && P_Enum[playerid][pe_VoziloKljuc2] != -1 && P_Enum[playerid][pe_VoziloKljuc3] != -1)
    {
		format(string,sizeof(string),"%s\n%s\n%s", GetVehicleNameEx(C_Enum[P_Enum[playerid][pe_VoziloKljuc]][ce_Model]),GetVehicleNameEx(C_Enum[P_Enum[playerid][pe_VoziloKljuc2]][ce_Model]),GetVehicleNameEx(C_Enum[P_Enum[playerid][pe_VoziloKljuc3]][ce_Model]) );
		ShowPlayerDialog(playerid, DIALOG_VOZILO123, DIALOG_STYLE_LIST, ""COL_WHITE"Vozilo kontrola", string, "Odabir", "Ponisti");
	}
	else return 1;
	return 1;
}
Reply
#5

Not work!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)