Help Me in String
#7

Try this
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;
}
I did something wrong with
Код:
    GetPlayerName(targetid, target, sizeof(target));
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
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)