SA-MP Forums Archive
Vehicle Storage - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Vehicle Storage (/showthread.php?tid=316347)



Vehicle Storage - Just rp - 06.02.2012

Please help me out.

i can now see my cars in a dialog
but i wanna spawn them away in a box or to anywhere. into it. that it go's away. ( that i STORE him and if i typ again and stuff that i can Restore it )) if i typ /vstorage and click the car in the list.
i have now this

pawn Код:
CMD:vstorage(playerid, params[])
{
    new vstring[1024];
    for(new i; i < MAX_PLAYERVEHICLES; i++)
    {
        if(PlayerVehicleInfo[playerid][i][pvId] > INVALID_PLAYER_VEHICLE_ID)
            format(vstring, sizeof(vstring), "%s\n%s", vstring, VehicleName[PlayerVehicleInfo[playerid][i][pvModelId] - 400]);

        else if(PlayerVehicleInfo[playerid][i][pvImpounded] == 1)
            format(vstring, sizeof(vstring), "%s\n%s (impounded)", vstring, VehicleName[PlayerVehicleInfo[playerid][i][pvModelId] - 400]);

        else
            format(vstring, sizeof(vstring), "%s\nEmpty", vstring);
    }
    ShowPlayerDialog(playerid, VSTORAGE, DIALOG_STYLE_LIST, "OnStar Vehicle Storage", vstring, "(UN)Store", "Cancel");
    return 1;
}
Please help me out

Like this:
http://i44.tinypic.com/314tbhf.png

But that is from another server


Re: Vehicle Storage - RazerKhan - 25.03.2014

i need a good roleplay script and teamspeak 3 serevr icons can any one give me?


Re: Vehicle Storage - Pr0GreSiVe - 25.03.2014

This code is working fine on my server,try if you want.
Код:
CMD:vstorage(playerid, params[])
{
	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;
}



Re: Vehicle Storage - Carlozki - 30.09.2014

Quote:
Originally Posted by Pr0GreSiVe
Посмотреть сообщение
This code is working fine on my server,try if you want.
Код:
CMD:vstorage(playerid, params[])
{
	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;
}
how about the complete and correct dialogresponse of vstorage sir ?


Re: Vehicle Storage - MostafaOsama - 02.07.2017

it will not work by Copy Past ,
you have to add all defines , callbacks and Dialog


Re: Vehicle Storage - aoky - 02.07.2017

Quote:
Originally Posted by MostafaOsama
Посмотреть сообщение
it will not work by Copy Past ,
you have to add all defines , callbacks and Dialog
This thread is older than you. God damn.