23.09.2014, 15:38
Hello, Every One
Today i Try To Making Rape + Cure Command But String Error im try search there much string and i want 1 only
i have 2 problem String And KillTimer
i try making kill timer on player death -health to stop but i get it error i making in 3 sec health -7 in 3 sec
please help me in string and kill timer thanks
sorry guys im bad i learn + try making code
Today i Try To Making Rape + Cure Command But String Error im try search there much string and i want 1 only
i have 2 problem String And KillTimer
Quote:
C:\Documents and Settings\000\My Documents\ffff\gamemodes\c.pwn(1003) : error 003: declaration of a local variable must appear in a compound block C:\Documents and Settings\000\My Documents\ffff\gamemodes\c.pwn(1003) : error 017: undefined symbol "string" C:\Documents and Settings\000\My Documents\ffff\gamemodes\c.pwn(1003) : warning 215: expression has no effect C:\Documents and Settings\000\My Documents\ffff\gamemodes\c.pwn(1003) : error 001: expected token: ";", but found "]" C:\Documents and Settings\000\My Documents\ffff\gamemodes\c.pwn(1003) : fatal error 107: too many error messages on one line |
PHP код:
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(playerid, x, y, z);
if(IsPlayerInRangeOfPoint(targetid, 5.0, x, y, z))
new string[500];
SetPlayerHealth(playerid, -7);
new playerid[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
new targetid[MAX_PLAYER_NAME];
format(str, sizeof(str), "INFO: You have rape %s!",target);
PlayerTimer[targetid] = SetTimerEx("Rape",3000,true,"i",targetid);
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]");
new string[500];
new targetid[MAX_PLAYER_NAME];
KillTimer(Rape[playerid]);
SetPlayerHealth(playerid, 100);
return 1;
}
please help me in string and kill timer thanks
PHP код:
forward Rape(playerid);
public Rape(playerid)
{
SetPlayerHealth(playerid, 0);
KillTimer(Rape[playerid]);
return 1;
}