04.08.2009, 15:37
Quote:
if(strcmp(cmdtext, "/usedrugs", true) == 0) { if(IsPlayerConnected(playerid)) { if(PlayerBoxing[playerid] > 0) { SendClientMessage(playerid, COLOR_GREY, " Cant use Drugs while you are fighting !"); return 1; } if(PlayerInfo[playerid][pDrugs] > 1) { PlayerStoned[playerid] += 1; if(PlayerStoned[playerid] >= 2) { GameTextForPlayer(playerid, "~w~You are~n~~p~Stoned", 4000, 1); } new Float:health; GetPlayerHealth(playerid, health); if(PlayerInfo[playerid][pDrugPerk] > 0) { new hp = 2 * PlayerInfo[playerid][pDrugPerk]; hp += 20; SetPlayerHealth(playerid, health + hp); } if(CommandUsed[playerid]) return SendClientMessage(playerid, COLOR_RED, "You must wait 30secounds before using drugs again."); { CommandUsed[playerid] = -1; // "tab" this one too SetTimerEx("resetCmd", 30000, 0, "i", playerid); // "tab" so it gets in the right position } else { SetPlayerHealth(playerid, health + 20.0); } SendClientMessage(playerid, COLOR_GREY, " 2 Drug Grams used !"); PlayerInfo[playerid][pDrugs] -= 2; if(STDPlayer[playerid]==1) { STDPlayer[playerid] = 0; SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You are no longer infected with a STD anymore because of the Drugs !"); } else if(STDPlayer[playerid]==2) { STDPlayer[playerid] = 1; SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You lowered the STD to Chlamydia because of the Drugs !"); } else if(STDPlayer[playerid]==3) { STDPlayer[playerid] = 2; SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You lowered the STD to Gonorrhea because of the Drugs !"); } } else { SendClientMessage(playerid, COLOR_GREY, " You dont have any Drug Grams left !"); } }//not connected return 1; } |
Quote:
D:\FOLDER~1\FOLDER~1\ASMP\gamemode\gf.pwn(23943) : error 029: invalid expression, assumed zero |
Quote:
CommandUsed[playerid] = -1; // "tab" this one too SetTimerEx("resetCmd", 30000, 0, "i", playerid); // "tab" so it gets in the right position } else { |