11.09.2012, 02:06
tente deste modo
Код:
if(strcmp(cmdtext,"/usemaconha",true) == 0 || strcmp(cmdtext,"/usarmaconha",true) == 0) { if(PlayerInfo[playerid][pJailed] != 0) { SendClientMessage(playerid,COLOR_YELLOW," Vocк nгo usar drogas na cadeia!"); return 1; } if(IsPlayerConnected(playerid)) { if(PlayerInfo[playerid][pDorgado] >= 160) { PlayerInfo[playerid][pDoenca] = 5; PlayerInfo[playerid][pDorgado] = 0; SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Vocк esta com cвncer de pulmгo, vб ate um hospital se tratar !"); SetPlayerDrunkLevel(playerid, GetPlayerDrunkLevel(playerid) + 2300); return 1; } if(PlayerInfo[playerid][pDoenca] == 5) { SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Vocк esta com cвncer de pulmгo, vб ate um hospital se tratar !"); return 1; } if(PlayerBoxing[playerid] > 0 || PlayerInfo[playerid][pJailed] != 0) { SendClientMessage(playerid,COLOR_GREY,"Vocк nгo pode usar Drogas enquanto vocк estб lutando !"); return 1; } if(PlayerInfo[playerid][pDrogas] > 1) { if(PlayerStoned[playerid] >= 3) { GameTextForPlayer(playerid,"~w~Vocк esta~n~~p~Lezado",4000,1); } new Float:PlayersArmour; GetPlayerArmour(playerid,PlayersArmour); PlayerInfo[playerid][pDrogas] -= 2; PlayerInfo[playerid][pDorgado] += 2; new Dmelhoria = 1 * PlayerInfo[playerid][pDrugPerk]; Dmelhoria += 2; if(PlayersArmour >= 100) { SetPlayerArmour(playerid, 100); SendClientMessage(playerid,COLOR_LIGHTRED,"* Vocк nгo pode mais usar drogas!"); return 1; } else { SetPlayerArmour(playerid, PlayersArmour + Dmelhoria); } GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), "* %s Fumou Maconha.", sendername); ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE); } else { SendClientMessage(playerid,COLOR_GREY,"Vocк nгo tem Gramas de Drogas Suficiente.!"); } }//not connected return 1; } if(strcmp(cmdtext,"/usecocaina",true) == 0 || strcmp(cmdtext,"/usarcocaina",true) == 0) { if(PlayerInfo[playerid][pJailed] != 0) { SendClientMessage(playerid,COLOR_YELLOW," Vocк nгo usar drogas na cadeia!"); return 1; } if(IsPlayerConnected(playerid)) { if(PlayerInfo[playerid][pDorgado] >= 120) { PlayerInfo[playerid][pDoenca] = 5; PlayerInfo[playerid][pDorgado] = 0; SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Vocк esta com cвncer de pulmгo, vб ate um hospital se tratar !"); SetPlayerDrunkLevel(playerid, GetPlayerDrunkLevel(playerid) + 2300); return 1; } if(PlayerInfo[playerid][pDoenca] == 5) { SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Vocк esta com cвncer de pulmгo, vб ate um hospital se tratar !"); return 1; } if(PlayerBoxing[playerid] > 0 || PlayerInfo[playerid][pJailed] != 0) { SendClientMessage(playerid,COLOR_GREY,"Vocк nгo pode usar drogas enquanto estб lutando !"); return 1; } if(PlayerInfo[playerid][pDrogas2] > 1) { PlayerStoned[playerid] += 1; if(PlayerStoned[playerid] >= 3) { GameTextForPlayer(playerid,"~w~Vocк estб~n~~p~Cherado",4000,1); } new Float:PlayersArmour; GetPlayerArmour(playerid,PlayersArmour); PlayerInfo[playerid][pDrogas2] -= 2; PlayerInfo[playerid][pDorgado] += 2; new Dmelhoria = 1 * PlayerInfo[playerid][pDrugPerk]; Dmelhoria += 2; if(PlayersArmour >= 100) { SetPlayerArmour(playerid, 100); SendClientMessage(playerid,COLOR_LIGHTRED,"* Vocк nгo pode mais usar drogas!"); return 1; } else { SetPlayerArmour(playerid, PlayersArmour + Dmelhoria); } GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), "* %s Cherou Cocaina.", sendername); ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE); } else { SendClientMessage(playerid,COLOR_GREY,"Vocк nгo tem Gramas de Drogas Suficiente.!"); } }//not connected return 1; } if(strcmp(cmdtext,"/usecrack",true) == 0 || strcmp(cmdtext,"/usarcrack",true) == 0) { if(PlayerInfo[playerid][pJailed] != 0) { SendClientMessage(playerid,COLOR_YELLOW," Vocк nгo usar drogas na cadeia!"); return 1; } if(IsPlayerConnected(playerid)) { if(PlayerInfo[playerid][pDorgado] >= 80) { PlayerInfo[playerid][pDoenca] = 5; PlayerInfo[playerid][pDorgado] = 0; SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Vocк estб com cвncer de pulmгo, vб ate um hospital se tratar !"); SetPlayerDrunkLevel(playerid, GetPlayerDrunkLevel(playerid) + 2300); return 1; } if(PlayerInfo[playerid][pDoenca] == 5) { SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Vocк estб com cвncer de pulmгo, vб ate um hospital se tratar !"); return 1; } if(PlayerBoxing[playerid] > 0 || PlayerInfo[playerid][pJailed] != 0) { SendClientMessage(playerid,COLOR_GREY,"Use Drogas enquanto vocк estб lutando !"); return 1; } if(PlayerInfo[playerid][pDrogas3] > 1) { new Float:PlayersArmour; GetPlayerArmour(playerid,PlayersArmour); PlayerInfo[playerid][pDrogas3] -= 2; PlayerInfo[playerid][pDorgado] += 2; new Dmelhoria = 1 * PlayerInfo[playerid][pDrugPerk]; Dmelhoria += 2; if(PlayersArmour >= 100) { SetPlayerArmour(playerid, 100); SendClientMessage(playerid,COLOR_LIGHTRED,"* Vocк nгo pode mais usar drogas!"); return 1; } else { SetPlayerArmour(playerid, PlayersArmour + Dmelhoria); } GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), "* %s Fumou Crack.", sendername); ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE); } else { SendClientMessage(playerid,COLOR_GREY,"Vocк nгo tem Gramas de Drogas Suficiente.!"); } }//not connected return 1; }