30.03.2013, 15:14
One Problem... It`s saying Please wait 1 minute even though I waited 5 minutes.
Код:
#include <a_samp> #include <ladmin> //////////////////////////////// new Float:hp; new Health[MAX_PLAYERS]; // At top ////////////////////////////////// ///////////////////////////////////// #define COLOR_GREY 0xAFAFAFAA #define COLOR_GREEN 0x33AA33AA #define COLOR_YELLOW 0xFFFF00AA #define COLOR_WHITE 0xFFFFFFAA #define COLOR_BLUE 0x0000BBAA #define COLOR_ORANGE 0xFF9900AA #define COLOR_RED 0xFF0000FF ///////////////////////////////////// #if defined FILTERSCRIPT ////////////////////////////////// #else ////////////////////////////////// #endif ////////////////////////////////// public OnPlayerCommandText(playerid, cmdtext[]) { Health[playerid] = 1; SetTimerEx("EndHealthAbuse", 30000, false, "i", playerid); //// 30 sec to prevent /heal abuse if (strcmp("/heal", cmdtext, true, 10) == 0) { if(IsPlayerVipType(playerid,3)) /// PREMIUM VIP { if(Health[playerid] == 1) return SendClientMessage(playerid, COLOR_RED, "Please wait another 1 minute before using /heal again."); GetPlayerHealth(playerid,hp); SetPlayerHealth(playerid,hp+40); /// 40/100 Health. } else SendClientMessage(playerid, COLOR_RED, "ERROR: You Are Not A Premium Vip Member!"); return 1; } return 0; } forward EndHealthAbuse(playerid); public EndHealthAbuse(playerid) { Health[playerid] = 0; return 1; }