28.05.2018, 05:52
hello when i type /heal in server nothing happens And there is no message
Please help:
this is my command:
Please help:
this is my command:
Код:
CMD:heal(playerid, params[]) { if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "You need to log in first."); if(IsPlayerConnected(playerid)) { new sendername[30],str[128],id,suma,Float:health; if(PlayerInfo[playerid][pMember] == 14 && IsAnAmbulance(GetPlayerVehicleID(playerid)) && GetPlayerVehicleSeat(playerid) == 0) if(PlayerInfo[playerid][pMember] == 18 && IsAnAmbulance(GetPlayerVehicleID(playerid)) && GetPlayerVehicleSeat(playerid) == 0) { if(sscanf(params, "ud",id,suma)) return SendClientMessage(playerid, COLOR_GREY, "Syntax:{FFFFFF} /heal [playerid/name] [amount]"); if(suma < 1 || suma > 2000) return SendClientMessage(playerid, COLOR_GREY, "Amount must be between 1 and 2000."); GetPlayerHealth(id, health); if(health <= 95) { if(GetPlayerCash(id) >= suma) { GivePlayerCash(id, -suma); GivePlayerCash(playerid, suma); Update(id, pCashx); Update(playerid, pCashx); SetPlayerHealthEx(id, 100.0); format(str, sizeof(str), "~h~healed~n~~g~+%s", FormatNumber(suma)); GameTextForPlayer(playerid, str, 5000, 1); new varxx[256],are; format(varxx, sizeof(varxx), "SELECT * FROM `antifraudaraport` WHERE `pid1`='%d' AND `pid2`='%d'", PlayerInfo[playerid][pSQLID], PlayerInfo[id][pSQLID]); new Cache: ab = mysql_query(SQL, varxx); if(cache_get_row_count() > 0) are = 1; cache_delete(ab); if(are == 0) { mysql_format(SQL, varxx, sizeof(varxx), "UPDATE users SET Raport1 = Raport1+1 WHERE name = '%s'", PlayerInfo[playerid][pNormalName]); mysql_tquery(SQL,varxx,"",""); mysql_format(SQL, varxx, sizeof(varxx), "INSERT INTO `antifraudaraport` (`pid1`,`pid2`,`time`) VALUES ('%d','%d','%d')", PlayerInfo[playerid][pSQLID], PlayerInfo[id][pSQLID], (gettime() + 900)); mysql_tquery(SQL,varxx,"",""); } } else return SendClientMessage(playerid, COLOR_GREY, "This player don't have enough money."); } else return SendClientMessage(playerid, COLOR_GREY, "This player have more than 95 hp."); } else { if(HealTimer[playerid] != 0) return SendClientMessage(playerid, COLOR_LIGHTGREEN3, "You need to wait 30 seconds before using /heal again."); if(InHouse[playerid] > 0) { if(HouseInfo[InHouse[playerid]][hHel] == 1) { SetPlayerHealthEx(playerid, 100.0); GetPlayerName(playerid, sendername, sizeof(sendername)); format(str, sizeof(str),"* %s ate some food.",sendername); ProxDetector(30.0, playerid, str, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE); HealTimer[playerid] = 30; } else return SendClientMessage(playerid, COLOR_GREY, "This house don't have a food upgrade."); } if(PlayerInfo[playerid][pMember] != 0 && IsInHQ(playerid)) { SetPlayerHealthEx(playerid, 100.0); SetPlayerHealthEx(playerid, 100.0); GetPlayerName(playerid, sendername, sizeof(sendername)); format(str, sizeof(str),"* %s ate some food.",sendername); ProxDetector(30.0, playerid, str, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE); HealTimer[playerid] = 30; } } } return 1; }