Help Me in String
#1

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
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(playeridparams[])
{
    new 
targetid;
    if(
sscanf(params"u"targetid)) return SendClientMessage(playeridCOLOR_RED"[USAGE]: /rape [Part of Name/Player ID]");
    new 
Float:xFloat:yFloat:z;
    
GetPlayerPos(playeridxyz);
    if(
IsPlayerInRangeOfPoint(targetid5.0xyz))
    new 
string[500];
    
SetPlayerHealth(playerid, -7);
    new 
playerid[MAX_PLAYER_NAME];
    
GetPlayerName(playeridnamesizeof(name));
    new 
targetid[MAX_PLAYER_NAME];
    
format(strsizeof(str), "INFO: You have rape %s!",target);
    
PlayerTimer[targetid] = SetTimerEx("Rape",3000,true,"i",targetid);
    return 
1;
}
CMD:cure(playeridparams[])
{
    new 
targetid;
    if(
sscanf(params"u"targetid)) return SendClientMessage(playeridCOLOR_RED"[USAGE]: /cure [Part of Name/Player ID]");
    new 
string[500];
    new 
targetid[MAX_PLAYER_NAME];
    
KillTimer(Rape[playerid]);
    
SetPlayerHealth(playerid100);
    return 
1;

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
PHP код:
forward Rape(playerid);
public 
Rape(playerid)
{
    
SetPlayerHealth(playerid0);
    
KillTimer(Rape[playerid]);
    return 
1;

sorry guys im bad i learn + try making code
Reply


Messages In This Thread
Help Me in String - by FisherMan - 23.09.2014, 15:38
Re: Help Me in String - by Sascha - 23.09.2014, 15:48
Re: Help Me in String - by FisherMan - 23.09.2014, 15:54
Re: Help Me in String - by FisherMan - 23.09.2014, 16:17
Re: Help Me in String - by XStormiest - 23.09.2014, 16:34
Re: Help Me in String - by FisherMan - 23.09.2014, 17:02
Re: Help Me in String - by XStormiest - 23.09.2014, 17:09
Re: Help Me in String - by FisherMan - 23.09.2014, 17:13
Re: Help Me in String - by XStormiest - 23.09.2014, 17:15
Re: Help Me in String - by FisherMan - 23.09.2014, 17:24

Forum Jump:


Users browsing this thread: 1 Guest(s)