Problem
#3

not heal -_-, its sethealth
pawn Код:
CMD:sethealth(playerid, params[])
{
    new Float:Health, ID;
    if(sscanf(params , "ii", ID, Health)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /sethealth [ID] [Health]");
    if(ID == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_ORANGE, "Error: Invalid Player ID");
    else
    {
        SetPlayerHealth(playerid, Health);
    }
    return 1;
}
and In this PM, all id's expect ID 0 has a bug
pawn Код:
CMD:pm (playerid, params[])
{
    new id, msg[256], P2[128], I2[128], Pn[25], In[25];
    GetPlayerName(playerid, Pn, 25)
    GetPlayerName(id, In, 25)
    if(sscanf(params , "us[100]",id, msg)) return SendClientMessage(playerid, COLOR_RED, "Usage: /pm [id] [msg]");
    if(id == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_RED, "Error: Player Not Connected");
    else
    {
        format(P2, 128, "PM from %s (%d): %s", Pn, playerid, msg);
        format(I2, 128, "PM Sent To %s (%d): %s", In, id, msg);
        SendClientMessage(playerid, COLOR_YELLOW, I2);
        SendClientMessage(id, COLOR_YELLOW, P2);
    }
    return 1;
}
if im id:0 and i pm another player,
i get

PM sent to myname (myid) : msg
Reply


Messages In This Thread
Problem - by newbie scripter - 10.11.2013, 05:20
Re: Problem - by kbalor - 10.11.2013, 05:23
Re: Problem - by newbie scripter - 10.11.2013, 05:51
Re: Problem - by 0x41726d79 - 10.11.2013, 05:55
Re: Problem - by kbalor - 10.11.2013, 06:01
Re: Problem - by andreasbleck - 10.11.2013, 06:03
Re: Problem - by newbie scripter - 10.11.2013, 06:12
Re: Problem - by Stinged - 10.11.2013, 06:25

Forum Jump:


Users browsing this thread: 1 Guest(s)