SA-MP Forums

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

Reply
 
Thread Tools Display Modes
Old 31/05/2017, 06:03 PM   #1
tekass
Little Clucker
 
Join Date: May 2017
Posts: 21
Reputation: 0
Post How to use "DestroyVehicle" without player in vehicle?

Hi all, i need help with the Callback "DestoyVehicle" Because I have succeded to make it work but only with GetPlayerVehicleID but I need to use it without player in the vehicle for my crusher system.

Here is the method I use:


Code:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp(cmdtext,"/fb", true))
     	{
      	new Float:x, Float:y, Float:z;
	new idcar;
	idcar = GetVehiclePos(idcar, x, y, z);
	DestroyVehicle(idcar);
     	GameTextForPlayer(playerid, "Vehicule broyer!", 3500, 1);
        }
}
Tanks for your help.

PS: Sorry for my bad english, im french...
tekass is offline   Reply With Quote
Old 31/05/2017, 09:54 PM   #2
Sew_Sumi
Banned
 
Join Date: Jun 2008
Location: Azerbaijan
Posts: 6,243
Reputation: 525
Default Re: How to use "DestroyVehicle" without player in vehicle?

idcar doesn't have any value...


You haven't checked for parameters in the command to make idcar have a value.
Sew_Sumi 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
How to use "DestroyVehicle" whitout player in vehicle? tekass Scripting Help 23 06/06/2017 01:58 AM
Help with "FADMIN" | How can i measure the Axis if i want to attach a object to a vehicle or player? ZayanImran Server Support 2 24/01/2013 07:38 PM
Does "DestroyVehicle" call public OnVehicleDeath? pasha97 Scripting Help 1 16/06/2012 03:20 PM
[Include] "OnPlayerLookAtVehicle" - Detect if a player is looking at some vehicle. iPLEOMAX Includes 46 28/01/2012 06:09 PM
"Slight homing", make a missile "Slightly!" home a vehicle. Donya Help Archive 4 11/06/2011 09:20 PM


All times are GMT. The time now is 08:32 PM.


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