25.07.2018, 07:38
Hi i've creating a bail command but when someone be jailed the amount jailed will be differnt of orginal bail amount it's changed automacily why..
How to Stop changing alot of amount's I just want Random Bail amount from 7k - 1k but they giving me a changing amounts...
PHP Code:
if(BailPlayer[playerid] == 1)
{
new bailplayerr = random(7000) + 1000;
if(bailplayerr > GetPlayerCash(playerid))
{
if(GetPlayerMoney(playerid) < bailplayerr) return SendClientMessage(playerid, COLOR_RED, "{FF0000}Error: {FFFFFF}You don't have engouh money to bail yourself.");
PHP Code:
forward pJailTimer(playerid);
public pJailTimer(playerid)
{
new bailplayerr = random(7000) + 1000;
RemovePlayerAttachedObject(playerid, 9);
SetPlayerSpecialAction(playerid, SPECIAL_ACTION_NONE);
PlayerInfo[playerid][pJailed] = 1;
pJailCount[playerid]--;
new string[128];
format(string, sizeof(string), "%d", pJailCount[playerid]);
TextDrawSetString(Textdraw1, string);
format(string, sizeof(string), "$%d", bailplayerr);