Jump to content
Autentificarea cu Google și Facebook nu mai este disponibilă. ×
  • 0

Question

Posted

Salut, am aceste doua warning-uri si nu stiu cum sa le rezolv. Daca poate sa ma ajute cineva, multumesc!

Warnings: D:\Downloads\Tuts GM (1)\Tuts GM\gamemodes\Tuts.pwn(4434) : warning 203: symbol is never used: "MY_GARAGE"
D:\Downloads\Tuts GM (1)\Tuts GM\gamemodes\Tuts.pwn(4434) : warning 203: symbol is never used: "MY_GARAGE_DESPAWNED"

COD:

DIALOG:MY_GARAGE(playerid, response, listitem)
{
    if(!response)
        return true;

    SetPVarInt(playerid, "VehSelect", playerInfo[playerid][pSelectVehicle][listitem]);
    if(PersonalVehicle[playerid][pSelectVehicle][listitem][pvSpawnedID] == INVALID_VEHICLE_ID)
        return Dialog_Show(playerid, MY_GARAGE_DESPAWNED, DIALOG_STYLE_LIST, "Server: My Vehicles", "Informations\nSpawn", "Select", "Close");

    return Dialog_Show(playerid, MY_GARAGE_SPAWNED, DIALOG_STYLE_LIST, "SERVER: My Vehicles", "Informations\nFind\nSpawn\nDespawn\nUnlock", "Select", "Close");
}

DIALOG:MY_GARAGE_DESPAWNED(playerid, response, listitem)
{
    if(!response)
        return true;

    new id = GetPVarInt(playerid, "VehSelect");
    if(!listitem)
    {
        new string[256];
        format(string, 256, "Model: %s (%d)\nPrimary color: %d\nSecondary color: %d\nKilometers: %.02f\nAge: %d days\nInsurance: %d points\nInsurance price: $%s", getVehicleName(PersonalVehicle[id][pvModelID]), PersonalVehicle[id][pvModelID], PersonalVehicle[id][pvColorOne], PersonalVehicle[id][pvColorTwo], PersonalVehicle[id][pvOdometer], getVehDays(id), PersonalVehicle[id][pvInsurancePoints], getInsurancePrice(floaround(PersonalVehicle[id][pvOdometer]), getVehDays(id)));
        return Dialog_Show(playerid, 0, DIALOG_STYLE_MSGBOX, "SERVER: Informations", string, "Close");
    }

    PersonalVehicle[id][pvSpawnedID] = CreateVehicle(PersonalVehicle[id][pvX], PersonalVehicle[id][Y], PersonalVehicle[id][pvZ], PersonalVehicle[id][pvAngle], PersonalVehicle[id][pvColorOne], PersonalVehicle[id][pvColorTwo], -1);
    SetVehicleInterior(PersonalVehicle[id][pvSpawnedID], PersonalVehicle[id][pvVirtualWorld]);
    LinkVehicleToInterior(PersonalVehicle[id][pvSpawnedID], PersonalVehicle[id][pvInterior]);
    SetVehicleNumberPlate(PersonalVehicle[id][pvSpawnedID], PersonalVehicle[id][pvCarPlate]);
    vehicle_fuel[PersonalVehicle[id][pvSpawnedID]] = PersonalVehicle[id][pvFuel];
    
    PersonalVehicle[id][pvDespawnTime] = (gettime() * 900);
    SCMF(playerid, -1, "Vehiculul tau %s, a fost spawnat la locul sau de parcare.", getVehicleName(PersonalVehicle[id][pvModelID]));
    return true;
}

YCMD:vehicles(playerid, params[], help)
{
    if(!Iter_Count(PlayerVehicles[playerid]))
        return sendPlayerError(playerid, "You don't own any cars!");

    new string[2048] = "Slot\tVehicle\tStatus\tDespawn Time\n", count = 0;
    foreach(new i : PlayerVehicles[playerid])
    {
        if(PersonalVehicle[i][pvSpawnedID] == INVALID_VEHICLE_ID)
        {
            format(string, 2048, "%s{ffffff}%d\t%s\t{ff0000}Despawned\t{ffffff}-\n", string, (i + 1), getVehicleName(PersonalVehicle[i][pvModelID]));
        }
        else
        {
            format(string, 2048, "%s{ffffff}%d\t%s\t%s\t%d min\n", string, (i + 1), getVehicleName(PersonalVehicle[i][pvModelID]), (IsVehicleOccupied(PersonalVehicle[i][pvSpawnedID])) ? ("{E5913E}Occupied{FFFFFF}") : ("{4DFF00}Spawned{FFFFFF}"), ((PersonalVehicle[i][pvDespawnTime] - gettime()) / 60));
        }
        
        playerInfo[playerid][pSelectVehicle][count] = i;
        count ++;
    }

    new title[64];
    format(title, 64, "%s's vehicles (%d slots)", getName(playerid), playerInfo[playerid][pVehicleSlots]);
    Dialog_Show(playerid, MY_GARAGE, DIALOG_STYLE_TABLIST_HEADERS, title, string, "Select", "Close");
    return true;
}

2 answers to this question

Recommended Posts

  • 0
Posted

Salut @Raduq,

Formatul corect pentru dialogurile create folosind easyDialog este urmatoarea: (EXEMPLU)

Dialog:MY_GARAGE(playerid, response, listitem)
{
	//condul tau
	return true;
}

Ce e diferit? DIALOG este scris cu litere mici (doar prima fiind mare) -> Rezultat: Dialog

  • Upvote 1

Daca te-am ajutat =>

spacer.png

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.