SA-MP Forums

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

Reply
 
Thread Tools Display Modes
Old 10/01/2018, 04:24 AM   #4031
BanhVo
Big Clucker
 
Join Date: Sep 2017
Posts: 93
Reputation: 20
Default Re: Little coding questions - For general minor queries 5

Quote:
Originally Posted by AlexMSK View Post
http://wiki.sa-mp.com/wiki/Keys

if(newkeys & KEY_SECONDARY_ATTACK)

I still can not open it. I want to take the Faction Dog open. I made it into filterscripts. Help me .
__________________
My job
Study map editing at Forum.sa-mp.com
Development of maps for SAMP Vietnamese
BanhVo is offline   Reply With Quote
Old 10/01/2018, 05:56 AM   #4032
iLearner
Gangsta
 
iLearner's Avatar
 
Join Date: Apr 2017
Posts: 577
Reputation: 134
Default Re: Little coding questions - For general minor queries 5

Quote:
Originally Posted by RowdyrideR View Post
i meant the number inside []

like: new query[256]
in this case its 256
Yeah, that number is sizeof the variable.
iLearner is offline   Reply With Quote
Old 18/01/2018, 01:21 PM   #4033
Garavel
Little Clucker
 
Garavel's Avatar
 
Join Date: Jan 2015
Posts: 35
Reputation: 2
Default Re: Little coding questions - For general minor queries 5

I somehow managed to make all the cars in my gamemode invincible against bullet damage. They take collision damage fine but they ignore bullets... Can't remember what I did that might cause that. I run a TDM server so it is pretty important Anyone have any idea what might be causing this? I know it is not setvehiclehealth, because I don't use it at all.
Garavel is offline   Reply With Quote
Old 18/01/2018, 07:18 PM   #4034
Infra
Big Clucker
 
Infra's Avatar
 
Join Date: Feb 2014
Location: Germany
Posts: 69
Reputation: 19
Default Re: Little coding questions - For general minor queries 5

Quote:
Originally Posted by Garavel View Post
I somehow managed to make all the cars in my gamemode invincible against bullet damage. They take collision damage fine but they ignore bullets... Can't remember what I did that might cause that. I run a TDM server so it is pretty important Anyone have any idea what might be causing this? I know it is not setvehiclehealth, because I don't use it at all.
Try that:

pawn Code:
public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ)
{
    if (hittype == BULLET_HIT_TYPE_VEHICLE)
        return false;
    return true;
}

Quote:
This callback is only called when lag compensation is enabled.
Infra is offline   Reply With Quote
Old 19/01/2018, 03:55 AM   #4035
coool
Gangsta
 
coool's Avatar
 
Join Date: Feb 2013
Location: Republic of Pakistan
Posts: 617
Reputation: 54
Default Re: Little coding questions - For general minor queries 5

Quote:
Originally Posted by BanhVo View Post
I still can not open it. I want to take the Faction Dog open. I made it into filterscripts. Help me .
Dog?
People are getting creative.
__________________
coool is offline   Reply With Quote
Old 19/01/2018, 10:57 AM   #4036
Garavel
Little Clucker
 
Garavel's Avatar
 
Join Date: Jan 2015
Posts: 35
Reputation: 2
Default Re: Little coding questions - For general minor queries 5

Quote:
Originally Posted by Infra View Post
Try that:

pawn Code:
public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ)
{
    if (hittype == BULLET_HIT_TYPE_VEHICLE)
        return false;
    return true;
}
Doesn't that make sure no vehicle is damaged though?
I need the opposite, I need the vehicles to do take damage from bullets
Garavel is offline   Reply With Quote
Old 19/01/2018, 12:20 PM   #4037
Infra
Big Clucker
 
Infra's Avatar
 
Join Date: Feb 2014
Location: Germany
Posts: 69
Reputation: 19
Default Re: Little coding questions - For general minor queries 5

Quote:
Originally Posted by Garavel View Post
Doesn't that make sure no vehicle is damaged though?
I need the opposite, I need the vehicles to do take damage from bullets
Got your post wrong , wops
Infra is offline   Reply With Quote
Old 19/01/2018, 05:26 PM   #4038
Dayrion
High-roller
 
Dayrion's Avatar
 
Join Date: Jan 2016
Location: France
Posts: 1,918
Reputation: 258
Default Re: Little coding questions - For general minor queries 5

CreateActor and CreateDynamicActor follow the same id incrementation or it's separate?
__________________
actor_plus - v5.0.2
I'm a goner, somebody catch my breath,
I'm a goner, somebody catch my breath
Dayrion is offline   Reply With Quote
Old 19/01/2018, 05:41 PM   #4039
ThePhenix
Gangsta
 
ThePhenix's Avatar
 
Join Date: May 2012
Posts: 802
Reputation: 157
Default Re: Little coding questions - For general minor queries 5

Quote:
Originally Posted by Dayrion View Post
CreateActor and CreateDynamicActor follow the same id incrementation or it's separate?
It's a different ID increment.
ThePhenix is offline   Reply With Quote
Old 19/01/2018, 06:08 PM   #4040
Dayrion
High-roller
 
Dayrion's Avatar
 
Join Date: Jan 2016
Location: France
Posts: 1,918
Reputation: 258
Default Re: Little coding questions - For general minor queries 5

Quote:
Originally Posted by ThePhenix View Post
It's a different ID increment.
Yes, still weird. Sometimes it does, sometimes it doesn't or it's maybe my code ahah
__________________
actor_plus - v5.0.2
I'm a goner, somebody catch my breath,
I'm a goner, somebody catch my breath
Dayrion 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 make a soldier aotumaticly be general when the general dies ? AlbanianGuy Scripting Help 35 13/05/2012 03:35 PM
Minor problem Desert Help Archive 4 17/03/2010 06:24 PM
Counting with mysql queries actiwe Help Archive 2 26/02/2010 02:36 PM
SQL queries using GROUP BY Dabombber Help Archive 1 05/10/2009 07:47 PM


All times are GMT. The time now is 05:48 AM.


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