05.03.2011, 15:19
Hey all again xD
So i got this:
The Problem is: a player can spam with /terroristlevel2 (if he got money)
So i got this:
pawn Код:
COMMAND:terroristlevel2(playerid, params[])
{
#pragma unused params
if (IsPlayerTerroristLevel1[playerid] == 1)
{
if(GetPlayerMoney(playerid) < 100000) return SendClientMessage(playerid, COLOR_RED, "ERROR : You need to have 100 000$ to be Level 2!");
IsPlayerTerroristLevel2[playerid] = true;
GivePlayerMoney(playerid, -100000);
GivePlayerWeapon(playerid, 36, 999999);
GivePlayerWeapon(playerid, 24, 999999);
GivePlayerWeapon(playerid, 16, 999999);
GivePlayerWeapon(playerid, 27, 999999);
GivePlayerWeapon(playerid, 31, 999999);
SendClientMessage(playerid, COLOR_BLUE, "SUCESS : You are now Level 2! Check out Your new Weapons! You can now drive Rhinos, Hydras, Hunters!");
}
else if (IsPlayerTerroristLevel1[playerid] == 0)
{
SendClientMessage(playerid, COLOR_RED, "ERROR : You aren't a Terrorist!");
}
else if (IsPlayerTerroristLevel2[playerid] == 1)
{
SendClientMessage(playerid, COLOR_RED, "ERROR : You are alredy Level 2!");
}
return true;
}