SA-MP Forums

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

Reply
 
Thread Tools Display Modes
Old 07/08/2013, 02:24 PM   #1
Vanter
Huge Clucker
 
Vanter's Avatar
 
Join Date: Jul 2013
Posts: 391
Reputation: 16
Default Vanter's vehicle control

Vanter's Vehicle Control


so, Here's a simple vehicle control filterscript

Requirments:
None.

Contains:
/engine /lights /boot /bonnet /lock /unlock /speed
Controls engine on/off, lights on/off, boot open/closed, bonnet open/closed, lock and unlock car, /speed to control vehicle speed

THAT'S IT

Just open this pastebin: http://pastebin.com/maEWnSqS
and copy it's components in your gamemode

NOTE: If you want the vehicle to spawn with engine on, remove ManualVehicleEngineAndLights(); under OnGameModeInIt
NOTE: To turn speed limit off, /speed 0

Thank You,
Vanter

Last edited by Vanter; 02/04/2016 at 07:44 PM.
Vanter is offline   Reply With Quote
Old 08/08/2013, 03:05 PM   #2
sheders
Big Clucker
 
Join Date: Apr 2012
Posts: 108
Reputation: 2
Default Re: Vanter's vehicle control

Hey, it's looks really nice. But can you please upload a short video when you showing the system?
sheders is offline   Reply With Quote
Old 14/08/2013, 11:15 AM   #3
Uberanwar
Gangsta
 
Uberanwar's Avatar
 
Join Date: May 2012
Location: Malaysia
Posts: 893
Reputation: 63
Default Re: Vanter's vehicle control

Does it has likes ** Uberanwar has turned on vehicle's ignition ** near players?
Uberanwar is offline   Reply With Quote
Old 14/08/2013, 11:17 AM   #4
Sellize
Gangsta
 
Sellize's Avatar
 
Join Date: Jan 2013
Location: (ง ͠ ͟ل͜ ͡)ง fight me irl
Posts: 708
Reputation: 293
Default Re: Vanter's vehicle control

Quote:
Imageshak.us isn't working for me, sorry, it doesn't need any screens btw.
There are like 1000 other image hosting websites, in the future please use imgur
__________________
dead
Sellize is offline   Reply With Quote
Old 14/08/2013, 11:19 AM   #5
Uberanwar
Gangsta
 
Uberanwar's Avatar
 
Join Date: May 2012
Location: Malaysia
Posts: 893
Reputation: 63
Default Re: Vanter's vehicle control

What is /speed? Can you give more explanation? Thnks.
Uberanwar is offline   Reply With Quote
Old 14/08/2013, 11:32 AM   #6
Vanter
Huge Clucker
 
Vanter's Avatar
 
Join Date: Jul 2013
Posts: 391
Reputation: 16
Default Re: Vanter's vehicle control

Uberanwar, for example you do /speed 100, the vehicle speed won't go faster than 100. maybe /speed 50, vehicle won't move faster than 50, /speed 0 to deactivate it.
Vanter is offline   Reply With Quote
Old 14/08/2013, 11:33 AM   #7
Uberanwar
Gangsta
 
Uberanwar's Avatar
 
Join Date: May 2012
Location: Malaysia
Posts: 893
Reputation: 63
Default Re: Vanter's vehicle control

Wow, that's great!
Uberanwar is offline   Reply With Quote
Old 14/08/2013, 11:37 AM   #8
Uberanwar
Gangsta
 
Uberanwar's Avatar
 
Join Date: May 2012
Location: Malaysia
Posts: 893
Reputation: 63
Default Re: Vanter's vehicle control

Uhm, I have some errors here. I don't know if I pasted the code correctly into OnPlayerUpdate.

Quote:
Code:
public OnPlayerUpdate(playerid){
	    if(GetTickCount() - armedbody_pTick[playerid] > 113){ //prefix check itter
		new
		weaponid[13],weaponammo[13],pArmedWeapon;
		pArmedWeapon = GetPlayerWeapon(playerid);
		GetPlayerWeaponData(playerid,1,weaponid[1],weaponammo[1]);
		GetPlayerWeaponData(playerid,2,weaponid[2],weaponammo[2]);
		GetPlayerWeaponData(playerid,4,weaponid[4],weaponammo[4]);
		GetPlayerWeaponData(playerid,5,weaponid[5],weaponammo[5]);
		#if ARMEDBODY_USE_HEAVY_WEAPON
		GetPlayerWeaponData(playerid,7,weaponid[7],weaponammo[7]);
		#endif
		if(weaponid[1] && weaponammo[1] > 0){
			if(pArmedWeapon != weaponid[1]){
				if(!IsPlayerAttachedObjectSlotUsed(playerid,0)){
					SetPlayerAttachedObject(playerid,0,GetWeaponModel(weaponid[1]),1, 0.199999, -0.139999, 0.030000, 0.500007, -115.000000, 0.000000, 1.000000, 1.000000, 1.000000);
				}
			}
			else {
				if(IsPlayerAttachedObjectSlotUsed(playerid,0)){
					RemovePlayerAttachedObject(playerid,0);
				}
			}
		}
		else if(IsPlayerAttachedObjectSlotUsed(playerid,0)){
			RemovePlayerAttachedObject(playerid,0);
		}
		if(weaponid[2] && weaponammo[2] > 0){
			if(pArmedWeapon != weaponid[2]){
				if(!IsPlayerAttachedObjectSlotUsed(playerid,1)){
					SetPlayerAttachedObject(playerid,1,GetWeaponModel(weaponid[2]),8, -0.079999, -0.039999, 0.109999, -90.100006, 0.000000, 0.000000, 1.000000, 1.000000, 1.000000);
				}
			}
			else {
				if(IsPlayerAttachedObjectSlotUsed(playerid,1)){
					RemovePlayerAttachedObject(playerid,1);
				}
			}
		}
		else if(IsPlayerAttachedObjectSlotUsed(playerid,1)){
			RemovePlayerAttachedObject(playerid,1);
		}
		if(weaponid[4] && weaponammo[4] > 0){
			if(pArmedWeapon != weaponid[4]){
				if(!IsPlayerAttachedObjectSlotUsed(playerid,2)){
					SetPlayerAttachedObject(playerid,2,GetWeaponModel(weaponid[4]),7, 0.000000, -0.100000, -0.080000, -95.000000, -10.000000, 0.000000, 1.000000, 1.000000, 1.000000);
				}
			}
			else {
				if(IsPlayerAttachedObjectSlotUsed(playerid,2)){
					RemovePlayerAttachedObject(playerid,2);
				}
			}
		}
		else if(IsPlayerAttachedObjectSlotUsed(playerid,2)){
			RemovePlayerAttachedObject(playerid,2);
		}
		if(weaponid[5] && weaponammo[5] > 0){
			if(pArmedWeapon != weaponid[5]){
				if(!IsPlayerAttachedObjectSlotUsed(playerid,3)){
					SetPlayerAttachedObject(playerid,3,GetWeaponModel(weaponid[5]),1, 0.200000, -0.119999, -0.059999, 0.000000, 206.000000, 0.000000, 1.000000, 1.000000, 1.000000);
				}
			}
			else {
				if(IsPlayerAttachedObjectSlotUsed(playerid,3)){
					RemovePlayerAttachedObject(playerid,3);
				}
			}
		}
		else if(IsPlayerAttachedObjectSlotUsed(playerid,3)){
			RemovePlayerAttachedObject(playerid,3);
		}
		#if ARMEDBODY_USE_HEAVY_WEAPON
		if(weaponid[7] && weaponammo[7] > 0){
			if(pArmedWeapon != weaponid[7]){
				if(!IsPlayerAttachedObjectSlotUsed(playerid,4)){
					SetPlayerAttachedObject(playerid,4,GetWeaponModel(weaponid[7]),1,-0.100000, 0.000000, -0.100000, 84.399932, 112.000000, 10.000000, 1.099999, 1.000000, 1.000000);
				}
			}
			else {
				if(IsPlayerAttachedObjectSlotUsed(playerid,4)){
					RemovePlayerAttachedObject(playerid,4);
				}
			}
		}
		else if(IsPlayerAttachedObjectSlotUsed(playerid,4)){
			RemovePlayerAttachedObject(playerid,4);
		}
		#endif
		armedbody_pTick[playerid] = GetTickCount();
	}
	
    if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER && Speedlimit[playerid])
    {
      new a, b, c;
      GetPlayerKeys(playerid, a, b ,c);
      if(a == 8 && GetVehicleSpeed(GetPlayerVehicleID(playerid), 0) > Speedlimit[playerid])
      {
         new newspeed = GetVehicleSpeed(GetPlayerVehicleID(playerid), 0) - Speedlimit[playerid];
         ModifyVehicleSpeed(GetPlayerVehicleID(playerid), -newspeed);
      }
    }
	return true;
}
Quote:
C:\Users\USER\Desktop\Street Kings Server\gamemodes\CNR.pwn(1824) : error 017: undefined symbol "Speedlimit"
C:\Users\USER\Desktop\Street Kings Server\gamemodes\CNR.pwn(1824) : warning 215: expression has no effect
C:\Users\USER\Desktop\Street Kings Server\gamemodes\CNR.pwn(1824) : error 001: expected token: ";", but found "]"
C:\Users\USER\Desktop\Street Kings Server\gamemodes\CNR.pwn(1824) : error 029: invalid expression, assumed zero
C:\Users\USER\Desktop\Street Kings Server\gamemodes\CNR.pwn(1824) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.
The errors come from here
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER && Speedlimit[playerid])
Uberanwar is offline   Reply With Quote
Old 14/08/2013, 12:55 PM   #9
Vanter
Huge Clucker
 
Vanter's Avatar
 
Join Date: Jul 2013
Posts: 391
Reputation: 16
Default Re: Vanter's vehicle control

link updatedd.
Vanter 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] Vehicle Control | 0.0.1 Alexis1999 Includes 14 24/08/2013 10:00 PM
[FilterScript] Vanter's Anti-Speed Hack Vanter Filterscripts 12 21/07/2013 03:02 AM
[FilterScript] Vanter's Anti-Weapon Hack Vanter Filterscripts 12 10/07/2013 03:53 PM
[FilterScript] SA-MP 0.3c Vehicle Control System (Control everything, you want) Auxxx Filterscripts 78 09/10/2012 10:40 PM


All times are GMT. The time now is 03:07 AM.


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