Vehicle Storage Problem
#7

Quote:
Originally Posted by Red_Dragon.
Посмотреть сообщение
This is an example for what do you want:
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == VSTORAGE 19104)
    {
        if(response)  
        {
           
            if(listitem == 0)
            {
                GivePlayerWeapon(playerid, WEAPON_DEAGLE, 14);
            }
            if(listitem == 1)
            {
                GivePlayerWeapon(playerid, WEAPON_AK47, 120);
            }
            if(listitem == 2)
            {
                GivePlayerWeapon(playerid, WEAPON_SHOTGSPA, 28);
            }
        }
        return 1;
    }
 
    return 0;
}
So now change the GivePlayerWeapon and its things to anything you want
Could it look somthing like this?

Код:
CMD:vstorage(playerid, params[])

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == VSTORAGE 19104)
	new vstring[1024];
	for(new i, iModelID; i < MAX_PLAYERVEHICLES; i++) {
		if((iModelID = PlayerVehicleInfo[playerid][i][pvModelId] - 400) >= 0) {
			if(PlayerVehicleInfo[playerid][i][pvImpounded]) {
				format(vstring, sizeof(vstring), "%s\n%s (impounded)", vstring, VehicleName[iModelID]);
			}
			else if(PlayerVehicleInfo[playerid][i][pvDisabled]) {
				format(vstring, sizeof(vstring), "%s\n%s (disabled)", vstring, VehicleName[iModelID]);
			}
			else if(!PlayerVehicleInfo[playerid][i][pvSpawned]) {
				format(vstring, sizeof(vstring), "%s\n%s (stored)", vstring, VehicleName[iModelID]);
			}
			else format(vstring, sizeof(vstring), "%s\n%s (spawned)", vstring, VehicleName[iModelID]);
		}
		else strcat(vstring, "\nEmpty");
	}
	ShowPlayerDialog(playerid, VSTORAGE, DIALOG_STYLE_LIST, "Vehicle storage", vstring, "(De)spawn", "Cancel");
	return 1;
}
Reply


Messages In This Thread
Vehicle Storage Problem - by eclipses - 11.10.2012, 13:36
Re: Vehicle Storage Problem - by Red_Dragon. - 11.10.2012, 13:45
Re: Vehicle Storage Problem - by eclipses - 11.10.2012, 13:49
Re: Vehicle Storage Problem - by Red_Dragon. - 11.10.2012, 13:51
Re: Vehicle Storage Problem - by eclipses - 11.10.2012, 14:09
Re: Vehicle Storage Problem - by Red_Dragon. - 11.10.2012, 14:27
Re: Vehicle Storage Problem - by eclipses - 12.10.2012, 01:29

Forum Jump:


Users browsing this thread: 2 Guest(s)