Hit Contract
#3

Код:
CMD:hitman(playerid, params[])
{
	new theScore, senderid;

	if(sscanf(params, "k<player_name>i", senderid, theScore)) return SCM(playerid, C_INFO, "/hitman [playerid] [score]");
	if(!IsPlayerConnected(senderid)) return playerMessage(playerid, C_RED, "Podano błędne id gracza!", "Invalid playerid!");
	if(theScore > pScore[playerid] || !(0 < theScore <= 500)) return playerMessage(playerid, C_RED, "Błędna ilość respektu [1 - 500]", "Invalid amount of score [1 - 500]");

	pHitman[senderid] += theScore;
	pScore[playerid] -= theScore;
	return serverMessageEx(-1, "%s "ORANGE"dał "WHITE"%d "ORANGE"expa za głowę gracza "WHITE"%s "ORANGE"- łącznie "WHITE"%d", "%s "ORANGE"gave "WHITE"%d "ORANGE"score for killing player "WHITE"%s "ORANGE"- together "WHITE"%d", pName[playerid], theScore, pName[senderid], pHitman[senderid]);
}

//OnPlayerDeath
if(pHitman[playerid])
	    {
	        serverMessageEx(-1, "%s "ORANGE"zdobył "WHITE"%d "ORANGE"pkt. respektu za zabуjstwo gracza "WHITE"%s", "%s "ORANGE"gained "WHITE"%d "ORANGE"score points for killing "WHITE"%s", pName[killerid], pHitman[playerid], pName[playerid]);
	        pScore[killerid] += pHitman[playerid];
	        pHitman[playerid] = 0;
		}
From my gamemode, you can edit it for yourself.
Reply


Messages In This Thread
Hit Contract - by FunnyBear - 01.01.2015, 20:20
Re: Hit Contract - by Neos07 - 01.01.2015, 21:21
Re: Hit Contract - by ball - 01.01.2015, 21:22
Re: Hit Contract - by jackx3rx - 01.01.2015, 21:42
Re: Hit Contract - by FunnyBear - 01.01.2015, 23:33

Forum Jump:


Users browsing this thread: 1 Guest(s)