24.08.2014, 22:53
ola pessoal so gostaria de saber se esta tudo certinho.
Код:
#include <a_Samp> #include <Dini> #if defined FILTERSCRIPT new DinheiroCaixinha; new RespeitoCaixinha; public OnPlayerCommandText(playerid, cmdtext[]) { if(strcmp(cmd, "/travarcaixinha", true) == 0) { if(IsPlayerConnected(playerid) && PlayerInfo[playerid][pAdmin] > 3) { caixinha = 0; SendClientMessage(playerid, COLOR_YELLOW, "[BEG] Caixinha travada!"); } return true; } if(strcmp(cmd, "/liberarcaixinha", true) == 0) { if(IsPlayerConnected(playerid) && PlayerInfo[playerid][pAdmin] > 3) { caixinha = char; SendClientMessage(playerid, COLOR_YELLOW, "[BEG] Caixinha liberada!"); } return true; } public OnPlayerKeyStateChange(playerid,newkeys,oldkeys) { //======= Caixinhas - Inicio ========// if(PlayerToPoint(2.0,playerid,1468.4370,-1661.2919,15.2203)) { new DinheiroCaixinha = 2000 + random(5000); new RespeitoCaixinha = random(3); if(PlayerInfo[playerid][pCaixinha] == char) { if(caixinha != char){SendClientMessage(playerid, COLOR_GRAD1, "Presentes bloqueados no momento.");return true;} SendClientMessage(playerid, COLOR_GRAD1, "Vocк pegou uma caixinha hб pouco tempo, volte no prуximo Payday!"); return true; } else { if(caixinha != char){SendClientMessage(playerid, COLOR_GRAD1, "Presentes bloqueados no momento.");return true;} PlayerInfo[playerid][pCaixinha] = char; format(string, sizeof(string), "%s pegou uma caixinha e ganhou R$%d e %d de respeito.",PlayerName(playerid), DinheiroCaixinha, RespeitoCaixinha); SendClientMessageToAll(COLOR_LIGHTRED,string); GivePlayerMoney(playerid, DinheiroCaixinha); PlayerInfo[playerid][pExp] += RespeitoCaixinha; format(string, sizeof(string), "Na caixinha continha R$%d e %d de respeito, volte no prуximo Payday!", DinheiroCaixinha, RespeitoCaixinha); SendClientMessage(playerid, COLOR_RED, string); } } return true; } #endif