11.06.2010, 20:52
hey! just 1 nub question
i just made this drug system and im trying to make it that you cant digest anymore drugs untill you are off the effect like for example:
*you are already high O_O*
anyways so far heres my code
i tried looking everywhere but i havent found my answer so i posted this topic :/
thx!
i just made this drug system and im trying to make it that you cant digest anymore drugs untill you are off the effect like for example:
*you are already high O_O*
anyways so far heres my code
Quote:
new Weed[MAX_PLAYERS]; new LSD[MAX_PLAYERS]; new Coke[MAX_PLAYERS]; new Ondrugs[MAX_PLAYERS]; |
Quote:
if(dialogid == 1 && response) { switch(listitem) { case 0://weed { if(Weed[playerid] >= 1) { SendClientMessage(playerid,0x03D687FF,"Your flying high O_O"); new Float:Health,Float:Armour; GetPlayerHealth(playerid,Health); GetPlayerArmour(playerid,Armour); SetTimerEx("WeedGone",60000,0,"i",playerid); Weed[playerid] -= 1; SetPlayerDrunkLevel (playerid, 50000); SetPlayerHealth(playerid,Health+20); SetPlayerChatBubble(playerid,"*Smokes a Blunt*",0xFF0000FF,100.0 ,9000 ); SetPlayerSpecialAction(playerid,SPECIAL_ACTION_SMO KE_CIGGY); Ondrugs[playerid] = 1; } if(Ondrugs[playerid] >= 2) { SendClientMessage(playerid,0x03D687FF,"You are already high x_x"); } else { SendClientMessage(playerid,0x03D687FF,"You Don't Have Any Weed"); } } case 1://LSD { if(LSD[playerid] >= 1) { SendClientMessage(playerid,0x03D687FF,"OMG X_X"); new Float:Health,Float:Armour; GetPlayerHealth(playerid,Health); GetPlayerArmour(playerid,Armour); SetTimerEx("LSDGone",60000,0,"i",playerid); LSD[playerid] -= 1; SetPlayerDrunkLevel (playerid, 50000); SetPlayerChatBubble(playerid,"*I see God O_O*",0xFF0000FF,100.0 ,9000 ); SetPlayerWeather(playerid,-65); Ondrugs[playerid] = 1; } if(Ondrugs[playerid] >= 2) { SendClientMessage(playerid,0x03D687FF,"You are already high x_x"); } else { SendClientMessage(playerid,0x03D687FF,"You Don't Have Any LSD"); } } case 2://Coke { if(Coke[playerid] >= 1) { SendClientMessage(playerid,0x03D687FF,"You should calm down dude o_O"); new Float:Health,Float:Armour; GetPlayerHealth(playerid,Health); GetPlayerArmour(playerid,Armour); SetTimerEx("CokeGone",60000,0,"i",playerid); Coke[playerid] -= 1; SetPlayerDrunkLevel (playerid, 50000); SetPlayerHealth(playerid,Health+20); SetPlayerArmour(playerid,Armour+15); SetPlayerChatBubble(playerid,"*Snorts Coke*",0xFF0000FF,100.0 ,9000 ); SetPlayerWeather(playerid,42); Ondrugs[playerid] = 1; } if(Ondrugs[playerid] >= 2) { SendClientMessage(playerid,0x03D687FF,"You are already high x_x"); } else { SendClientMessage(playerid,0x03D687FF,"You Don't Have Any Coke"); } } } } return 1; } forward WeedGone(playerid); public WeedGone(playerid) { SetPlayerDrunkLevel(playerid,0); SetPlayerSpecialAction(playerid,SPECIAL_ACTION_NON E); Ondrugs[playerid] = 0; return 1; } forward LSDGone(playerid); public LSDGone(playerid) { SetPlayerDrunkLevel(playerid,0); Ondrugs[playerid] = 0; return 1; } forward CokeGone(playerid); public CokeGone(playerid) { SetPlayerDrunkLevel(playerid,0); Ondrugs[playerid] = 0; return 1; } |
thx!