[HELP]/robbar command
#1

I've got two questions:

1.) How can I make it so you can't spam a /robbar command?
2.) How can I show the amount of money robbed from a store?

So far, I've made a working /robbar command, here's the script:

Код:
CMD:robbar(playerid, params[])
{
	#pragma unused params
	if (gTeam[playerid] == TEAM_CIVI)
	{
	    if (GetPlayerInterior(playerid) == 11 || IsPlayerInRangeOfPoint(playerid, 2, 496.8070, -76.0364, 998.7578))
	    {
	        new pName[MAX_PLAYER_NAME], str[128];
	        GetPlayerName(playerid, pName, sizeof(pName));
	        format(str, sizeof(str), "|_ROBBERY_|: %s has just robbed a bar!", pName);
	        SendClientMessageToAll(COLOR_GREEN, str);
	        GivePlayerMoney(playerid, random(400000));
	        SetTimer("Unrobbable",6000,1);
	    }
	}
}

forward Unrobbable();
public Unrobbable()
{
	new
			x = 6000;
	while(x > 6000)
	{
	    x++;
	}
	return 0;
}
NOTE: This is kind of like an extra bonus thing you could help me with. Whenever I input the command whilst in the checkpoint, I get the amount of money, yet I also get SERVER: Unknown Command.
Reply


Messages In This Thread
[HELP]/robbar command - by Leon_Rahil! - 26.12.2010, 08:34
Re: [HELP]/robbar command - by Jochemd - 26.12.2010, 08:42
Re: [HELP]/robbar command - by Jochemd - 26.12.2010, 08:47
Re: [HELP]/robbar command - by Leon_Rahil! - 26.12.2010, 09:08

Forum Jump:


Users browsing this thread: 1 Guest(s)