[Include] Car damage system - Damage a car without a driver!
#21

Quote:
Originally Posted by g_aSlice
Посмотреть сообщение
You can't know if a player is aiming through a wall or not. Unless you load collision files from the GTA game and check the collision, which would be incredibly slow and a waste of time imo.
Also, what I meant by damaging the vehicle while jumping: You can jump/lay down/etc. and press tab/fire to damage the vehicle..
Also.. If someone is HOLDING fire while pressing another key, OnPlayerKeyStateChange will be called several times and the timer will be created several times.
Mh.. so I should use pressed instead?

Thanks nice guy
Reply
#22

- Updated.
Reply
#23

- Updated again, new callbacks and stuff.
Reply
#24

Theres also another one. Carsync(h)

idk which is better but anyways.
Reply
#25

got errors like this:

Код:
error 028: invalid subscript (not an array or too many subscripts): "Created"
Reply
#26

Quote:
Originally Posted by titanak
Посмотреть сообщение
got errors like this:

Код:
error 028: invalid subscript (not an array or too many subscripts): "Created"
It's strange.. did you change anything on the inc?
Reply
#27

I Got errors when i compil:


H:\backup\samp03bsvr_R2_win32\pawno\include\YSI/y_hooks.inc(1494) : warning 201: redefinition of constant/macro (symbol "OnPlayerEnterCheckpoint")
H:\backup\samp03bsvr_R2_win32\pawno\include\YSI/y_hooks.inc(152 : warning 201: redefinition of constant/macro (symbol "OnPlayerLeaveCheckpoint")
H:\backup\samp03bsvr_R2_win32\pawno\include\YSI/y_hooks.inc(2072) : warning 201: redefinition of constant/macro (symbol "OnPlayerKeyStateChange")
H:\backup\samp03bsvr_R2_win32\pawno\include\Damage .inc(54) : error 004: function "OnPlayerUnShotVehicle" is not implemented
H:\backup\samp03bsvr_R2_win32\pawno\include\Damage .inc(8 : error 004: function "OnPlayerShotVehicle" is not implemented
H:\backup\samp03bsvr_R2_win32\pawno\include\Damage .inc(9 : error 004: function "OnPlayerShotVehicle" is not implemented
H:\backup\samp03bsvr_R2_win32\pawno\include\Damage .inc(10 : error 004: function "OnPlayerShotVehicle" is not implemented
H:\backup\samp03bsvr_R2_win32\pawno\include\Damage .inc(11 : error 004: function "OnPlayerShotVehicle" is not implemented
H:\backup\samp03bsvr_R2_win32\pawno\include\Damage .inc(12 : error 004: function "OnPlayerShotVehicle" is not implemented
H:\backup\samp03bsvr_R2_win32\gamemodes\xrp187.PWN (85) : error 021: symbol already defined: "FALSE"
H:\backup\samp03bsvr_R2_win32\gamemodes\xrp187.PWN (1109) : error 021: symbol already defined: "Timer"
H:\backup\samp03bsvr_R2_win32\gamemodes\xrp187.PWN (17163) : error 035: argument type mismatch (argument 1)
H:\backup\samp03bsvr_R2_win32\gamemodes\xrp187.PWN (23795) : error 033: array must be indexed (variable "Timer")
H:\backup\samp03bsvr_R2_win32\gamemodes\xrp187.PWN (101506) : error 021: symbol already defined: "GetDistanceToCar"
H:\backup\samp03bsvr_R2_win32\gamemodes\xrp187.PWN (101605) : error 055: start of function body without function header
H:\backup\samp03bsvr_R2_win32\gamemodes\xrp187.PWN (101606) : error 010: invalid function or declaration
H:\backup\samp03bsvr_R2_win32\gamemodes\xrp187.PWN (101609) : error 055: start of function body without function header
H:\backup\samp03bsvr_R2_win32\gamemodes\xrp187.PWN (101610) : error 010: invalid function or declaration
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
Reply
#28

I included the callbacks bellow

public OnPlayerShotVehicle(playerid, vehicleid);
{ //your code here
return 1;
}
public OnPlayerUnShotVehicle(playerid, vehicleid);
{ //your code here
return 1;
}

but i meet the same problem

H:\backup\samp03bsvr_R2_win32\pawno\include\YSI/y_hooks.inc(1494) : warning 201: redefinition of constant/macro (symbol "OnPlayerEnterCheckpoint")
H:\backup\samp03bsvr_R2_win32\pawno\include\YSI/y_hooks.inc(152 : warning 201: redefinition of constant/macro (symbol "OnPlayerLeaveCheckpoint")
H:\backup\samp03bsvr_R2_win32\pawno\include\YSI/y_hooks.inc(2072) : warning 201: redefinition of constant/macro (symbol "OnPlayerKeyStateChange")
H:\backup\samp03bsvr_R2_win32\pawno\include\Damage .inc(54) : error 004: function "OnPlayerUnShotVehicle" is not implemented
H:\backup\samp03bsvr_R2_win32\pawno\include\Damage .inc(8 : error 004: function "OnPlayerShotVehicle" is not implemented
H:\backup\samp03bsvr_R2_win32\pawno\include\Damage .inc(9 : error 004: function "OnPlayerShotVehicle" is not implemented
H:\backup\samp03bsvr_R2_win32\pawno\include\Damage .inc(10 : error 004: function "OnPlayerShotVehicle" is not implemented
H:\backup\samp03bsvr_R2_win32\pawno\include\Damage .inc(11 : error 004: function "OnPlayerShotVehicle" is not implemented
H:\backup\samp03bsvr_R2_win32\pawno\include\Damage .inc(12 : error 004: function "OnPlayerShotVehicle" is not implemented
H:\backup\samp03bsvr_R2_win32\gamemodes\xrp187.PWN (85) : error 021: symbol already defined: "FALSE"
H:\backup\samp03bsvr_R2_win32\gamemodes\xrp187.PWN (1109) : error 021: symbol already defined: "Timer"
H:\backup\samp03bsvr_R2_win32\gamemodes\xrp187.PWN (17163) : error 035: argument type mismatch (argument 1)
H:\backup\samp03bsvr_R2_win32\gamemodes\xrp187.PWN (23795) : error 033: array must be indexed (variable "Timer")
H:\backup\samp03bsvr_R2_win32\gamemodes\xrp187.PWN (101506) : error 021: symbol already defined: "GetDistanceToCar"
H:\backup\samp03bsvr_R2_win32\gamemodes\xrp187.PWN (101605) : error 055: start of function body without function header
H:\backup\samp03bsvr_R2_win32\gamemodes\xrp187.PWN (101606) : error 010: invalid function or declaration
H:\backup\samp03bsvr_R2_win32\gamemodes\xrp187.PWN (101609) : error 055: start of function body without function header
H:\backup\samp03bsvr_R2_win32\gamemodes\xrp187.PWN (101610) : error 010: invalid function or declaration

what can be the problem? please if anyone can help me i will be gratefull
Reply
#29

Me smells major lag.
Reply
#30

Good job man
Reply
#31

nice and useful
Reply
#32

Код:
C:\Documents and Settings\user\Desktop\x\xxxx\gamemodes\larp.pwn(83167) : error 021: symbol already defined: "DistanceCameraTargetToLocation"
C:\Documents and Settings\user\Desktop\x\xxxx\gamemodes\larp.pwn(83184) : error 021: symbol already defined: "IsPlayerAimingAt"
C:\Documents and Settings\user\Desktop\x\xxxx\gamemodes\larp.pwn(84828) : error 021: symbol already defined: "encode_panels"
C:\Documents and Settings\user\Desktop\x\xxxx\gamemodes\larp.pwn(84832) : error 021: symbol already defined: "encode_doors"
C:\Documents and Settings\user\Desktop\x\xxxx\gamemodes\larp.pwn(84838) : error 021: symbol already defined: "encode_lights"
C:\Documents and Settings\user\Desktop\x\xxxx\gamemodes\larp.pwn(84894) : warning 203: symbol is never used: "D_OnPlayerConnect"
C:\Documents and Settings\user\Desktop\x\xxxx\gamemodes\larp.pwn(84894) : warning 203: symbol is never used: "D_OnPlayerDisconnect"
C:\Documents and Settings\user\Desktop\x\xxxx\gamemodes\larp.pwn(84894) : warning 203: symbol is never used: "D_OnPlayerKeyStateChange"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


5 Errors.
5 errors
help!
Reply
#33

errors
Код:
C:\Users\Vijay_Rasigan\Desktop\CR-RP(LS)\CR-RP(LS)\GameModes\RWRP.pwn(1896) : error 021: symbol already defined: "GetDistanceToCar"
C:\Users\Vijay_Rasigan\Desktop\CR-RP(LS)\CR-RP(LS)\GameModes\RWRP.pwn(2307) : error 021: symbol already defined: "DistanceCameraTargetToLocation"
C:\Users\Vijay_Rasigan\Desktop\CR-RP(LS)\CR-RP(LS)\GameModes\RWRP.pwn(2397) : error 021: symbol already defined: "IsPlayerAimingAt"
C:\Users\Vijay_Rasigan\Desktop\CR-RP(LS)\CR-RP(LS)\GameModes\RWRP.pwn(45003) : warning 203: symbol is never used: "D_OnPlayerConnect"
C:\Users\Vijay_Rasigan\Desktop\CR-RP(LS)\CR-RP(LS)\GameModes\RWRP.pwn(45003) : warning 203: symbol is never used: "D_OnPlayerDisconnect"
C:\Users\Vijay_Rasigan\Desktop\CR-RP(LS)\CR-RP(LS)\GameModes\RWRP.pwn(45003) : warning 203: symbol is never used: "D_OnPlayerKeyStateChange"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


3 Errors.
Anybody
Reply
#34

Read first post guys..
Reply
#35

I guys, I'm new and I have this error:

C:\Program Files (x86)\Rockstar Games\SAMP Server\gamemodes\grandlarc.pwn(474) : warning 203: symbol is never used: "D_OnPlayerConnect"
C:\Program Files (x86)\Rockstar Games\SAMP Server\gamemodes\grandlarc.pwn(474) : warning 203: symbol is never used: "D_OnPlayerDisconnect"
C:\Program Files (x86)\Rockstar Games\SAMP Server\gamemodes\grandlarc.pwn(474) : warning 203: symbol is never used: "D_OnPlayerKeyStateChange"
C:\Program Files (x86)\Rockstar Games\SAMP Server\gamemodes\grandlarc.pwn(474) : warning 203: symbol is never used: "gArmySpawns"
C:\Program Files (x86)\Rockstar Games\SAMP Server\gamemodes\grandlarc.pwn(474) : warning 203: symbol is never used: "gMedicalSpawns"
C:\Program Files (x86)\Rockstar Games\SAMP Server\gamemodes\grandlarc.pwn(474) : warning 203: symbol is never used: "gPoliceSpawns"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


6 Warnings.

I use the basic grandlarc gamemode, and I don't understand what I must do with the callbacks, etc

Can you help me ?
Reply
#36

Link down?

please poste Pastebin
Reply
#37

HOW THE F*** DO YOU INSTALL THIS I'VE BEEN TRYING FOR DAYS!
Reply
#38

How can I add more damage to the vehicle? I mean 4 magazines with an m4 too take down a mananna.
Reply
#39

I was wondering if this would sync-up with other players. I mean, for example:

If player A shoots a vehicle until it explodes and no one is around him. Here comes player B driving or coming towards him. What would he actually see when it streams?

I've seen some bugs that vehicles suddenly blow-up when streamed in, would that occur as well?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)