*** This title is not descriptive - ******
#1

I NEED HITMAN SYSTEM FOR MY SERVER - BUT I CANT FIND IT ANYWHERE PLEASE HELP GUYS...!!!

LIKE /HIT

/CONTRACTS - SHOWINNG HIT CONTRACTS OR SOMETHING LIKE IT SIMILAR PLEASE HELP HERE

/hitlist

i so something like this in ransee mod if one of you cand edit and make fs and send to me that would be perfect.
Reply
#2

Quote:

if(strcmp(cmd, "/contract", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(gPlayerLogged[playerid] == 0)
{
SendClientMessage(playerid, COLOR_GREY, "* Not Logged In");
return 1;
}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "USAGE: /contract [playerid/PartOfName] [amount]");
return 1;
}
giveplayerid = ReturnUser(tmp);
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "USAGE: /contract [playerid/PartOfName] [amount]");
return 1;
}
moneys = strval(tmp);
if(moneys < 10000 || moneys > 100000) { SendClientMessage(playerid, COLOR_WHITE, "* Contract money must be atleast $10000, and not more then $100000!"); return 1; }
/* if(PlayerInfo[playerid][pLevel] < 1)
{
SendClientMessage(playerid, COLOR_WHITE, "You must be level 3 to place a Contract.");
return 1;
}*/
if (IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
if(PlayerInfo[giveplayerid][pMember] == 8 && PlayerInfo[playerid][pMember] ==
{
SendClientMessage(playerid, COLOR_WHITE, "* Cannot place Contracts on your own Agency!");
return 1;
}
else if(PlayerInfo[giveplayerid][pLeader] == 8 && PlayerInfo[playerid][pMember] ==
{
SendClientMessage(playerid, COLOR_WHITE, "* Cannot place Contracts on your own Agency!");
return 1;
}
else if(PlayerInfo[giveplayerid][pMember] == 8||PlayerInfo[giveplayerid][pLeader] ==
{
SendClientMessage(playerid, COLOR_WHITE, "* Can't contract a Hitman !");
return 1;
}
if(giveplayerid == playerid) { SendClientMessage(playerid, COLOR_WHITE, "You cannot Contract yourself!"); return 1; }
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
playerpcash = PlayerInfo[playerid][pCash];
if (moneys > 0 && playerpcash >= moneys)
{
ServerGivePlayerMoney(playerid, (0 - moneys));
PlayerInfo[giveplayerid][pHeadValue]+=moneys;
format(string, sizeof(string), "%s has placed a contract on %s, for $%d.",sendername, giveplayer, moneys);
SendFamilyMessage(8, COLOR_YELLOW, string);
format(string, sizeof(string), "* You placed a contract on %s, for $%d.",giveplayer, moneys);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
}
else
{
SendClientMessage(playerid, COLOR_WHITE, "* Invalid transaction amount.");
}
}
}
else
{
format(string, sizeof(string), "* %d is not an active player.", giveplayerid);
SendClientMessage(playerid, COLOR_WHITE, string);
}
}
return 1;
}
return 1;
}

looking for these?
Reply
#3

Quote:
Originally Posted by Lumixa
Посмотреть сообщение
looking for these?
Yeah something like this but let me give you a small e.g


Quote:

public OnPlayerDisconnect(playerid, reason)
{

if(GetPlayerTeam(killerid) == HITMAN && HasHit[playerid] == 1)
{
new string[250], string2[250], string3[250], name[MAX_PLAYER_NAME], hitman[MAX_PLAYER_NAME], bonus = random(GetPlayerMoney(playerid));
GetPlayerName(playerid, name, sizeof(name));
GetPlayerName(killerid, hitman, sizeof(hitman));
SendClientMessage(playerid, GRAY, "|_| Hit Contract Expired |_|");
format(string, sizeof(string), "Hitman %s[ID:%d] has killed you for a Hit Contract.", hitman, killerid);
SendClientMessage(playerid, WHITE, string);
HasHit[playerid] = 0;
SendClientMessage(playerid, COLOR_MIDNIGHTBLUE, "|_| Hit Contract Completed! |_|");
format(string2, sizeof(string2), "%s[ID:%d] had a Hit Contract. You've completed it.", name, playerid);
SendClientMessage(playerid, COLOR_MIDNIGHTBLUE, string2);
format(string3, sizeof(string3), "You've earned $5000 and a Bonus of $%d", bonus);
SendClientMessage(playerid, COLOR_MIDNIGHTBLUE, string3);
GivePlayerMoney(killerid, 5000+bonus);
}
}

if(killerid == INVALID_PLAYER_ID && HasHit[playerid] == 1)
{
SendClientMessage(playerid, GRAY, "|_| Hit Contract Expired |_|");
SendClientMessage(playerid, COLOR_MIDNIGHTBLUE, "You've died. The Hit Contract expired.");
HasHit[playerid] = 0;
}

if(GetPlayerTeam(playerid) == THIEF || GetPlayerTeam(playerid) == HITMAN || GetPlayerTeam(playerid) == TERRORIST)
{
SetPlayerTeam(playerid, CIVILIAN);
ChoosingRole[playerid] = 1;
}

if(killerid != INVALID_PLAYER_ID)
{
if(GetPlayerTeam(killerid) == THIEF || GetPlayerTeam(killerid) == HITMAN || GetPlayerTeam(killerid) == TERRORIST) SetPlayerColor(killerid, RED);



Код:
	if(strcmp(cmd, "/hit", true) == 0)
	{
	    new count = 0, hittedname[MAX_PLAYER_NAME], string[250], hitmenmsg[250];
	    GetPlayerName(strval(tmp), hittedname, sizeof(hittedname));
		tmp = strtok(cmdtext, idx);
		if(strlen(tmp) == 0) return SendClientMessage(playerid, ERROR, "Use: /hit [ID]");
		if(GetPlayerTeam(playerid) != COP && GetPlayerTeam(playerid) != PARAMEDIC)
		{
		    if(strval(tmp) != playerid)
		    {
		        if(IsPlayerSpawned(strval(tmp)))
		        {
		            if(GetPlayerMoney(playerid) >= 5000)
		            {
						for(new i = 0; i < MAX_PLAYERS; i++)
						{
							if(IsPlayerSpawned(i) && GetPlayerTeam(i) == HITMAN)
							{
								count++;
							}
						}
						if(count > 0)
						{
						    GivePlayerMoney(playerid, -5000);
						    SendClientMessage(playerid, GRAY, "|_| Hit Placed |_|");
							format(string, sizeof(string), "You have placed a hit on %s[ID:%d]", hittedname, strval(tmp));
							SendClientMessage(playerid, WHITE, string);
							HasHit[strval(tmp)] = 1;
							GameTextForPlayer(strval(tmp), "~r~HIT CONTRACT~n~~w~PLACED ON YOU!", 3000, 5);
							format(hitmenmsg, sizeof(hitmenmsg), "[HQ] %s[ID:%d] placed a Hit on %s[ID:%d]", name, playerid, hittedname, strval(tmp));
							SendRadioMessageToHitmen(hitmenmsg);
							return true;
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)