Hitmen commands?
#1

I have no idea on how to do hitmen commands like
/givehit [targetid] [id]
/takehit [id]
and when you kill someone it gives you the money.

HELP?
Reply
#2

what do you mean in "hitemen", you want if someone did the command /givehit 0[id] 500[money] and after that someone killed the id 0 so he will get the money?
Reply
#3

Yes.
Reply
#4

Do you have a hitman faction?
Reply
#5

Yes, I just need the commands.
Reply
#6

If you want it without a variable you can use this:
Код:
if(!strcmp(cmd,"/givehit",true))
	{
	    new
	        ID[256],
	        Amount[256]
	        ;
	    ID = strtok(cmdtext, idx);
	    Amount = strtok(cmdtext, idx);
		if(!strlen(ID) && !strlen(Amount) && !IsPlayerConnected(strval(ID))) return SendClientMessage(playerid, -1, !IsPlayerConnected(strval(ID))? ("This player not connected") : ("You need to write playerid and amount."));
		if(GetPlayerMoney(playerid) < strval(Amount)) return SendClientMessage(playerid, -1, "Invalid amount.");
		return GivePlayerMoney(playerid, -strval(Amount)), GivePlayerMoney(strval(ID), strval(Amount));
	}
Reply
#7

Its RP right?
Reply
#8

Quote:
Originally Posted by Accord
Посмотреть сообщение
If you want it without a variable you can use this:
Код:
if(!strcmp(cmd,"/givehit",true))
	{
	    new
	        ID[256],
	        Amount[256]
	        ;
	    ID = strtok(cmdtext, idx);
	    Amount = strtok(cmdtext, idx);
		if(!strlen(ID) && !strlen(Amount) && !IsPlayerConnected(strval(ID))) return SendClientMessage(playerid, -1, !IsPlayerConnected(strval(ID))? ("This player not connected") : ("You need to write playerid and amount."));
		if(GetPlayerMoney(playerid) < strval(Amount)) return SendClientMessage(playerid, -1, "Invalid amount.");
		return GivePlayerMoney(playerid, -strval(Amount)), GivePlayerMoney(strval(ID), strval(Amount));
	}
This is not useful to me, I use zcmd.

Quote:
Originally Posted by dannyk0ed
Посмотреть сообщение
Its RP right?
Yes..
Reply
#9

You can change it, you know..
Reply
#10

Quote:
Originally Posted by Accord
Посмотреть сообщение
You can change it, you know..
This will not work.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)