forward Rape2(playerid);
public Rape2(playerid)
{
GetPlayerHealth(playerid,health);
SetPlayerHealth(playerid,health-7);
return 1;
}
CMD:rape(playerid, params[])
{
new targetid;
if(sscanf(params, "u", targetid)) return SendClientMessage(playerid, COLOR_RED, "[USAGE]: /rape [Part of Name/Player ID]");
new Float:x, Float:y, Float:z;
GetPlayerPos(targetid, x, y, z);
if(IsPlayerInRangeOfPoint(playerid, 5.0, x, y, z)) {
new string[500];
new target[MAX_PLAYER_NAME];
GetPlayerName(targetid, target, sizeof(target));
format(string, sizeof(string), "INFO: You have rape %s!",target);
PlayerTimer[targetid] = SetTimerEx("Rape2",3000,true,"i",targetid); }
else SendClientMessage(playerid, COLOR_RED, "Your message here if player is not near target!");
return 1;
}
CMD:cure(playerid, params[])
{
new targetid;
if(sscanf(params, "u", targetid)) return SendClientMessage(playerid, COLOR_RED, "[USAGE]: /cure [Part of Name/Player ID]");
KillTimer(PlayerTimer[playerid]);
return 1;
}
CMD:cure(playerid, params[])
{
new targetid;
if(sscanf(params, "u", targetid)) return SendClientMessage(playerid, COLOR_RED, "[USAGE]: /cure [Part of Name/Player ID]");
KillTimer(PlayerTimer[playerid]);
return 1;
}
new Float:health;
Your Rape2 function needs to have the 'health' variable created. To do this, add
Код:
new Float:health; I don't know if that is what you mean so please elaborate on the problem if you can. |