SA-MP Forums

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

Reply
 
Thread Tools Display Modes
Old 27/07/2013, 06:18 PM   #1
Sellize
Gangsta
 
Sellize's Avatar
 
Join Date: Jan 2013
Location: (ง ͠° ͟ل͜ ͡°)ง fight me irl
Posts: 709
Reputation: 293
Default onplayerkeystatechange

Why doesnt this do anything
Code:
if (PRESSED(KEY_CROUCH))
	{
	    if(IsPlayerInAnyVehicle(playerid))
	    {
	        if(GetPlayerVehicleID(playerid) == 462)
	        {
	            new faggio = GetPlayerVehicleID(playerid);
	            new Float:x, Float:y, Float:z;
	            GetVehiclePos(faggio, x, y, z);
	            SetVehiclePos(faggio, x, y + 2, z);
	            PutPlayerInVehicle(playerid, faggio, 0);
	            PlayerPlaySound(playerid, 1133, 0.0, 0.0, 0.0);
	        }
	    }
	}
__________________
dead
Sellize is offline   Reply With Quote
Old 27/07/2013, 06:29 PM   #2
MellowHammer
Little Clucker
 
Join Date: Jul 2013
Posts: 25
Reputation: 1
Default Re: onplayerkeystatechange

pawn Code:
if (PRESSED(KEY_CROUCH))
    {
        if(IsPlayerInAnyVehicle(playerid))
        {
            if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 462)
            {
                new faggio = GetPlayerVehicleID(playerid);
                new Float:x, Float:y, Float:z;
                GetVehiclePos(faggio, x, y, z);
                SetVehiclePos(faggio, x, y + 2, z);
                PutPlayerInVehicle(playerid, faggio, 0);
                PlayerPlaySound(playerid, 1133, 0.0, 0.0, 0.0);
            }
        }
    }
MellowHammer is offline   Reply With Quote
Old 27/07/2013, 06:31 PM   #3
dannyk0ed
Gangsta
 
dannyk0ed's Avatar
 
Join Date: Mar 2011
Posts: 783
Reputation: 39
Default Re: onplayerkeystatechange

pawn Code:
if(GetPlayerVehicleID(playerid) == 462)
I don't understand what you are trying to do here. If the vehicle ID is 460 then the command goes through.
Are you trying to get the model ID or something else?
__________________
-Ex - HBG/InterGaming Developer (2 years)
dannyk0ed is offline   Reply With Quote
Old 27/07/2013, 06:32 PM   #4
Richie©
Banned
 
Join Date: Feb 2012
Location: Norway
Posts: 368
Reputation: 53
Default Re: onplayerkeystatechange

Player is inside a faggio, move the faggio and put him back in the faggio and play a sound. Why?
Richie© is offline   Reply With Quote
Old 27/07/2013, 06:49 PM   #5
Sellize
Gangsta
 
Sellize's Avatar
 
Join Date: Jan 2013
Location: (ง ͠° ͟ل͜ ͡°)ง fight me irl
Posts: 709
Reputation: 293
Default Re: onplayerkeystatechange

Quote:
Originally Posted by Richie© View Post
Player is inside a faggio, move the faggio and put him back in the faggio and play a sound. Why?
lol its funny how you stated it, keep an eye on the filterscripts board. Its a funny script
__________________
dead
Sellize 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
OnPlayerKeyStateChange ?? Ultrascipter Scripting Help 2 13/04/2013 08:13 PM
OnPlayerKeystateChange Tamer Scripting Help 4 31/12/2012 04:06 PM
Need help with OnPlayerKeyStateChange pliptm Scripting Help 4 31/08/2011 06:33 PM
OnPlayerKeyStateChange. budelis Help Archive 2 11/08/2011 03:08 PM


All times are GMT. The time now is 04:17 PM.


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