SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 21/03/2018, 10:42 AM   #1
firstlast488
Little Clucker
 
Join Date: Jan 2016
Posts: 19
Reputation: 0
Default Vehicle help

Can you help me to add location of car in the command of vstorage in dialog box?

Code:
CMD:vstorage(playerid, params[])
{
   	if(AdminDuty[playerid] == 1)
 	{
  		SendClientMessage(playerid,COLOR_WHITE, "You can't use this command while on-duty as admin.");
		return 1;
	}
	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{FFA500}Vehicle:{FFFFFF} %s {FFA500}| Status: {FFFFFF}Impounded", vstring, VehicleName[iModelID]);
			}
			else if(PlayerVehicleInfo[playerid][i][pvDisabled]) {
				format(vstring, sizeof(vstring), "%s\n{FFA500}Vehicle:{FFFFFF} %s {FFA500}| Status: {FFFFFF}Disabled", vstring, VehicleName[iModelID]);
			}
			else if(!PlayerVehicleInfo[playerid][i][pvSpawned]) {
				format(vstring, sizeof(vstring), "%s\n{FFA500}Vehicle:{FFFFFF} %s {FFA500}| Status: {FFFFFF}Stored", vstring, VehicleName[iModelID]);
			}
			else format(vstring, sizeof(vstring), "%s\n{FFA500}Vehicle:{FFFFFF} %s {FFA500}| Status: {FFFFFF}Spawned", vstring, VehicleName[iModelID]);
		}
		else strcat(vstring, "\nEmpty");
	}
	ShowPlayerDialogEx(playerid, VEHICLESTORAGE, DIALOG_STYLE_LIST, "Vehicle storage", vstring, "(De)spawn", "Cancel");
	return 1;
}
firstlast488 is offline   Reply With Quote
Old 21/03/2018, 10:52 AM   #2
PowerMwK
Big Clucker
 
PowerMwK's Avatar
 
Join Date: Sep 2016
Location: Brazil - Ba
Posts: 172
Reputation: 4
Default Re: Vehicle help

PHP Code:
// Put the player's vehicle at the coordinates 0, 0, 3 (center of SA)
new vehicleid GetPlayerVehicleID(playerid);
SetVehiclePos(vehicleid003);
//SetVehiclePos(vehicleid, Float:x, Float:y, Float:z); 
http://wiki.sa-mp.com/wiki/SetVehiclePos
__________________
DISCORD DO SERVIDOR:

DISCORD DO TIME DE DESENVOLVIMENTO E CRIAÇÃO:
Desenvolvimento RPG-DM:

PowerMwK is offline   Reply With Quote
Old 21/03/2018, 10:57 AM   #3
firstlast488
Little Clucker
 
Join Date: Jan 2016
Posts: 19
Reputation: 0
Default Re: Vehicle help

how to add ex. {FFA500}| Location: {FFFFFF}%sJefferson
Code:
if(PlayerVehicleInfo[playerid][i][pvImpounded]) {
				format(vstring, sizeof(vstring), "%s\n{FFA500}Vehicle:{FFFFFF} %s {FFA500}| Status: {FFFFFF}Impounded", vstring, VehicleName[iModelID]);
			}
firstlast488 is offline   Reply With Quote
Old 21/03/2018, 10:59 AM   #4
Hitropl
Little Clucker
 
Join Date: Aug 2013
Posts: 25
Reputation: 0
Default Re: Vehicle help

Create the names of the streets with their coordinates, then in your cycle, you will find out which name street
Hitropl is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Include] vFunc - Synced random vehicle colors (-1), GetVehicleColor and more vehicle-related functions (UPDATED FOR 0.3.7) MP2 Includes 41 22/07/2016 08:17 AM
[FilterScript] tAxI's Xtreme Vehicle Management - Advanced Vehicle Ownership and Administration Menu CJay9209 Filterscripts 13 16/10/2015 07:21 AM
Vehicle System: Vehicle spawns with saved Modelid and color1+2 but not on the XYZA DizZykeee Scripting Help 14 23/09/2015 09:16 PM
Angle Issues: Setting a attached object on a vehicle to face a vehicle Kar Scripting Help 2 11/07/2012 12:37 AM
[FilterScript] [FS] tAxI's Vehicle Streamer [v0.2] - add unlimited vehicle spawns and models!!! cptnsausage Filterscripts 205 31/07/2010 05:29 AM


All times are GMT. The time now is 10:12 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.