Two questions
#1

MY kick command
pawn Код:
dcmd_kick(playerid,params[])
{
    new string[128];
    new ID;
    new cmdreason[100];
    new pname[MAX_PLAYER_NAME];
    new tname[MAX_PLAYER_NAME];
    GetPlayerName(playerid,pname,sizeof(pname));
    GetPlayerName(ID,tname,sizeof(tname));
    if(sscanf(params,"us[100]",ID,cmdreason))
    {
        SendClientMessage(playerid,COLOR_ERROR,"[USAGE] /kick (Player Name/ID) (Reason)");
        return 1;
    }
    if(!IsPlayerConnected(ID))
    {
        format(string,sizeof(string),"[ERROR] The player ID you entered is not connected to the server.");
        SendClientMessage(playerid,COLOR_RED,string);
        return 1;
    }
    format(string, sizeof(string), "~r~KICKED!");
    GameTextForPlayer(ID, string, 3000, 1);

    format(string,sizeof(string),"[KICKED] Administrator %s(%d) has kicked you from the server. [Reason: %s]",pname,playerid,cmdreason);
    SendClientMessage(ID,COLOR_RED,string);
   
    format(string,sizeof(string),"[ADMIN KICK] Administrator has kicked %s(%d). [Reason: %s]",tname,ID,cmdreason);
    SendClientMessageToAll(COLOR_PINK,string);

    format(string,sizeof(string),"9[ADMIN KICK] Administrator has kicked %s(%d). [Reason: %s]",tname,ID,cmdreason);
    IRC_GroupSay(gGroupID,IRC_CHANNEL,string);

    format(string,sizeof(string),"[ADMIN RADIO] Administrator %s(%d) has kicked %s(%d). [Reason: %s]",pname,playerid,tname,ID,cmdreason);
    SendAdminMessage(COLOR_PINK,string);
    IRC_GroupSay(gGroupID,IRC_ADMINCHANNEL,string);
    Kick(ID);
    return 1;
}
It has something to do 0.3x that Kick is over any text or dialougs..
I need to know how to delay itt..


Second one is..
pawn Код:
dcmd_sethealth(playerid,params[])
{
    new string[128];
    new ID;
    new cmdreason;
    new pname[MAX_PLAYER_NAME];
    new tname[MAX_PLAYER_NAME];
    GetPlayerName(playerid,pname,sizeof(pname));
    GetPlayerName(ID,tname,sizeof(tname));
    if(sscanf(params,"us[100]",ID,cmdreason))
    {
        SendClientMessage(playerid,COLOR_ERROR,"[USAGE] /sethealth (Player Name/ID) (Health)");
        return 1;
    }
    if(!IsPlayerConnected(ID))
    {
        format(string,sizeof(string),"[ERROR] The player ID you entered is not connected to the server.");
        SendClientMessage(playerid,COLOR_RED,string);
        return 1;
    }
    if(IsSpawned[ID] != 1)
    {
        format(string,sizeof(string),"[ERROR] %s(%d) is not spawned to set his health.",tname,ID);
        SendClientMessage(playerid,COLOR_RED,string);
        return 1;
    }
    format(string,sizeof(string),"[HEALTH] Administrator %s(%d) has set your health to %d.",pname,playerid,cmdreason);
    SendClientMessage(ID,COLOR_PINK,string);

    format(string,sizeof(string),"[HEALTH] You have set %s(%d)'s health to %d.",tname,ID,cmdreason);
    SendClientMessage(playerid,COLOR_PINK,string);
   
    SetPlayerHealth(ID, cmdreason);
    format(string,sizeof(string),"[ADMIN RADIO] Administrator %s(%d) has set %s(%d)'s health to %d",pname,playerid,tname,ID,cmdreason);
    SendAdminMessage(COLOR_PINK,string);
    IRC_GroupSay(gGroupID,IRC_ADMINCHANNEL,string);
    return 1;
}
Even if player is in server, it always says :"player not connected"


No compiling errors at all
Reply


Messages In This Thread
Two questions - by _Khaled_ - 23.06.2013, 01:27
Re: Two questions - by horsemeat - 23.06.2013, 01:50
Re: Two questions - by RedFusion - 23.06.2013, 01:55
Re: Two questions - by _Khaled_ - 23.06.2013, 02:20
Re: Two questions - by Kindred - 23.06.2013, 02:38
Re: Two questions - by _Khaled_ - 23.06.2013, 02:44
Re: Two questions - by Kindred - 23.06.2013, 02:58
Re: Two questions - by Scenario - 23.06.2013, 03:01

Forum Jump:


Users browsing this thread: 1 Guest(s)