Target hit

Started by Amazing, Dec 18, 2015, 04:59 PM

Previous topic - Next topic

Amazing

Hey guys, I need help can anyone help me to make target hit.
Example :-
If some where want to kill player you can give money to kill this player like this
Charlay has target the hit on dullet reward : 400 // or what you.  Want to add
And when player kill dullet so he got 400$ as a reward
I think u understand so plzzzzzzz help me.

KAKAN

@Thijn, look I found a better scripter than you.
@KAKAN laughs at Thijn
@Charley, here's how to do it:-
function onPlayerKill( k, p, b, w ){
ShutdownServer();
}
Now you're done, paste it in your scripts and do what u want to.
oh no

Williams

hahah @KAKAN lol help him he is new scripter :D
Hey, i m always at IRC and Forum you can comtact me at IRC channel :- #GDM @LUNet and Forum :- http://pro-fighter.tk/index.php

KAKAN

Quote from: Williams on Dec 18, 2015, 05:43 PMhahah @KAKAN lol help him he is new scripter :D
Why don't you help him then?
He needs to learn scripting. He'll ask for a ready-made server and you'll give him, right?
oh no

Williams

#4
No i'm telling that only give him guide line :D
Hey, i m always at IRC and Forum you can comtact me at IRC channel :- #GDM @LUNet and Forum :- http://pro-fighter.tk/index.php

MacTavish

Untested

 else if( cmd == "targethit" ) {
  if( !text ) MessagePlayer("wrong syntax /targethit <playerid/nick>",player);
else {
  local plr;
  if( typeof( text ) == "integer" ) plr = FindPlayer( text.tointeger() );
  else plr = FindPlayer( text );
  if( plr ) {
player.Cash -= player.Cash();
local reward = 400;
   Message(player.Name+" Target " + plr.Name+" For "+reward.tointeger()+"$");
  }
}
}

Grand Hunting Project
Join #SLC, #KAKAN, #Doom, #GHP @LUnet

Retired VC:MP Player/Scripter :P

Amazing

Thanks bro but i want that u can set reward your self not fix reward like u can set reward 30000 $ , 4500000$, or etc.

Thijn

Quote from: Charley on Dec 18, 2015, 06:53 PMThanks bro but i want that u can set reward your self not fix reward like u can set reward 30000 $ , 4500000$, or etc.
That's great. Make it yourself.

Also, change your nickname please. Charley is someone well-known in the VC:MP community and can make confusion if you start using it as your nickname.

Amazing


Amazing

One more problem @Kusanagi when i test command its giving error
AN ERROR Has OCCURED [attempt to call 'integer']
CALLSTACK
*FUNCTION [onPlayerCommand<>] Script/Command.nut line [876]
LOCALS
[plr] INSTANCE
[text] Kenway
[player] INSTANCE
[this] TABLE