SA-MP Forums

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

 
 
Thread Tools Display Modes
Old 04/04/2010, 06:07 PM   #1
DarrenReeder
Huge Clucker
 
DarrenReeder's Avatar
 
Join Date: Apr 2010
Posts: 489
Reputation: 5
Default Detect if player has Shot someone else (And been Shot)?

**Modifed topic to new question...**

Hello,

I would like to know if there is a callback or any other way to detect if i have shot someone or have been shot (Sorta like OnPlayerDeath(playerid,killerid,reason) but more like.. OnPlayerHit(playerid,killerid,reason) )

If there is no callback how could i create my own way of detecting this?


**for being shot..i could check if health has gone down?? but how can i detect if they player has actually be SHOT by another player or if you shoot someone**
DarrenReeder is offline  
Old 04/04/2010, 06:09 PM   #2
AdrianX9
Little Clucker
 
Join Date: Mar 2010
Posts: 29
Reputation: 0
Default Re: Anti-money hack help?

Look the command that you uses to give you money...
It must be GivePlayerMoney2, if is GivePlayerMoney it will quit your money off
AdrianX9 is offline  
Old 04/04/2010, 06:10 PM   #3
DarrenReeder
Huge Clucker
 
DarrenReeder's Avatar
 
Join Date: Apr 2010
Posts: 489
Reputation: 5
Default Re: Anti-money hack help?

Quote:
Originally Posted by AdrianX9
Look the command that you uses to give you money...
It must be GivePlayerMoney2, if is GivePlayerMoney it will quit your money off
Yea but even when i use givePlayerMoney2 it still resets my money...As well as the problem that it resets my money as soon as i log into the server.
DarrenReeder is offline  
Old 04/04/2010, 06:12 PM   #4
Beaver07
Big Clucker
 
Join Date: Sep 2007
Posts: 171
Reputation: 0
Default Re: Anti-money hack help?

it's pretty simple to do if you know what your doing

just create a new variable for players ie

new Money[MAX_PLAYERS];

and set all their cash to that variable instead of using GetPlayerCash or anything just use the id

so for when new players register do

Money[playerid] = 5000; SetPlayerCash(playerid,Money[playerid]);
that will then set their cash to the Money ID and when subtracting or adding cash add it to Money[playerid]
instead of GivePlayerCash or w.e it is and just make a timer where if GetPlayerCash > Money[playerid] then SetPlayerCash(playerid,Money[playerid]); that way it'll check if their cash is greater than wat you gave them it will just set their cash to Money[playerid]; therefore making it impossible to money hack
Beaver07 is offline  
Old 04/04/2010, 06:28 PM   #5
DarrenReeder
Huge Clucker
 
DarrenReeder's Avatar
 
Join Date: Apr 2010
Posts: 489
Reputation: 5
Default Re: Detect if player has Shot someone else (And been Shot)?

new question*
DarrenReeder is offline  
Old 04/04/2010, 06:29 PM   #6
Carlton
Gangsta
 
Carlton's Avatar
 
Join Date: Mar 2010
Posts: 687
Reputation: 0
Default Re: Detect if player has Shot someone else (And been Shot)?

I've seen your question asked several times. Search.
Carlton is offline  
Old 04/04/2010, 06:30 PM   #7
DarrenReeder
Huge Clucker
 
DarrenReeder's Avatar
 
Join Date: Apr 2010
Posts: 489
Reputation: 5
Default Re: Detect if player has Shot someone else (And been Shot)?

Quote:
Originally Posted by Carlton
I've seen your question asked several times. Search.
Search for....??

Its a big question, if i search for my title of the Topic exactly...nothing else will show up -.-
DarrenReeder is offline  
Old 04/04/2010, 06:33 PM   #8
[MWR]Blood
High-roller
 
Join Date: Apr 2009
Posts: 2,272
Reputation: 105
Default Re: Anti-money hack help?

Quote:
Originally Posted by Beaver07
it's pretty simple to do if you know what your doing

just create a new variable for players ie

new Money[MAX_PLAYERS];

and set all their cash to that variable instead of using GetPlayerCash or anything just use the id

so for when new players register do

Money[playerid] = 5000; SetPlayerCash(playerid,Money[playerid]);
that will then set their cash to the Money ID and when subtracting or adding cash add it to Money[playerid]
instead of GivePlayerCash or w.e it is and just make a timer where if GetPlayerCash > Money[playerid] then SetPlayerCash(playerid,Money[playerid]); that way it'll check if their cash is greater than wat you gave them it will just set their cash to Money[playerid]; therefore making it impossible to money hack
GetPlayerCash and SetPlayerCash don't exist.
GetPlayerMoney and SetPlayerMoney are correct.
__________________
[MWR]Blood is offline  
Old 04/04/2010, 06:35 PM   #9
Carlton
Gangsta
 
Carlton's Avatar
 
Join Date: Mar 2010
Posts: 687
Reputation: 0
Default Re: Detect if player has Shot someone else (And been Shot)?

Quote:
Originally Posted by DarrenReeder
Quote:
Originally Posted by Carlton
I've seen your question asked several times. Search.
Search for....??

Its a big question, if i search for my title of the Topic exactly...nothing else will show up -.-
I swear to god, sometimes I feel users on this forum are senseless.

http://forum.sa-mp.com/index.php?topic=146728.0
http://forum.sa-mp.com/index.php?topic=138575.0
http://forum.sa-mp.com/index.php?topic=66921.0 << Least useful.
http://forum.sa-mp.com/index.php?topic=140371.0 << Most useful.

There are more links but I didn't feel like going on.
Carlton is offline  
Old 04/04/2010, 06:37 PM   #10
biltong
Gangsta
 
Join Date: Jan 2010
Posts: 546
Reputation: 0
Default Re: Detect if player has Shot someone else (And been Shot)?

I think with the new camera functions I believe it's possible

Though I have no idea how to use them.
__________________
My releases:
[FS]Admin Click - An admin shortcut script. Lots of commands like kick and ban in a few mouse clicks!
[FS]Vehicle Names - Simple script that displays your vehicle's name whenever you enter one.
[GM]Cops 'n Criminals - An unusual TDM.


Not active anymore, PM me if necessary.
biltong is offline  
 

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
[FilterScript] [FS] 1 shot - 1 death v0.1 ^Woozie^ Filterscripts 18 04/04/2012 06:52 AM
[Map] [MAP] M4 Shot (DM MAP) Hor1z0n Maps 8 04/03/2010 02:07 PM
One bullet one shot HELP Jaztek_Hodzic Help Archive 4 24/06/2009 02:50 PM
screen shot with command ? Baff Help Archive 5 17/04/2009 01:53 PM


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


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