EARNS[playerid] = TextDrawCreate(304.000000, 116.000000, "+ points");
TextDrawBackgroundColor(EARNS[playerid], 255);
TextDrawFont(EARNS[playerid], 2);
TextDrawLetterSize(EARNS[playerid], 0.520000, 2.200000);
TextDrawColor(EARNS[playerid], 227526655);
TextDrawSetOutline(EARNS[playerid], 0);
TextDrawSetProportional(EARNS[playerid], 1);
TextDrawSetShadow(EARNS[playerid], 1);
// If player kills someone he will be awarded with +1 point level and +50 respect
new killedwho[MAX_PLAYERS];
GetPlayerName(playerid,killedwho,sizeof(killedwho)); // Killer's name
format(iString, sizeof iString, "{9FF781}* You killed %s and took +1 points and +50 respect", killedwho);
SendClientMessage(killerid, -1, iString);
format(iString, sizeof iString, "{D8D8D8}(INFO) Respect: %i", pInfo[killerid][Respect]);
SendClientMessage(killerid, -1, iString);
TextDrawShowForPlayer(playerid, EARNS[playerid]); <--- thats the points TD
SetTimer("HideTextdraw", 5000, false);
pInfo[killerid][Points] += 1;
pInfo[killerid][Respect] += 50;
SetPlayerScore(killerid, GetPlayerScore(killerid) + 15);
pInfo[killerid][Score] += 15;
GameTextForPlayer(killerid,"~y~+15", 400,4);
forward HideTextdraw(playerid);
public HideTextdraw(playerid)
{
TextDrawHideForPlayer(playerid, EARNS[playerid]);
}
SetTimerEx("HideTextdraw", 5000, false, "i", playerid);
stock randomEx(min, max)
{
//Credits to ******
new rand = random(max-min)+min;
return rand;
}
// usage
new _randVal = randomEx(5, 10); // min value is 5, max is 10; assigned to _randVal
stock minrand (min, max) // By Alex "******" Cole { return random (max - min) + min; }
Hey @Private2000, in what way or where would the "randomEx" be used?
or this: Код:
stock minrand (min, max) // By Alex "******" Cole { return random (max - min) + min; } |