23.09.2014, 17:09
Try this
I did something wrong with
As you can see all errors now come from a single line: 1006 wich was the one above, try the new code.
thats why it gave those errors, but now is fixed xD
pawn Код:
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];
SetPlayerHealth(playerid, 0);
new target[MAX_PLAYER_NAME];
GetPlayerName(targetid, target, sizeof(target));
format(string, sizeof(string), "INFO: You have rape %s!",target);
PlayerTimer[targetid] = SetTimerEx("Rape",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(Rape[targetid]);
SetPlayerHealth(targetid, 100);
return 1;
}
Код:
GetPlayerName(targetid, target, sizeof(target));
thats why it gave those errors, but now is fixed xD