Vehicle Storage
#1

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
Reply
#2

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

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;
}
Reply
#4

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 ?
Reply
#5

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

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)