Some commands
#6

Untested, but should work
I guess you use Stevo's SF CnR GM so i made it in dcmd for you
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    dcmd(eject, 5, cmdtext);
    dcmd(admins, 6, cmdtext);
    dcmd(adslap, 6, cmdtext);
    return 0;
}

dcmd_eject(playerid, params[])
{
    new targetid = strval(params);
    if(isnull(params)) return SendClientMessage(playerid, 0xFF0000AA, "USAGE: /eject (id)");
    else if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, 0xFF0000AA, "You're not in a vehicle!");
    else if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER) return SendClientMessage(playerid, 0xFF0000AA, "Only the player in the driver seat can use this command!");
    else if(GetPlayerVehicleID(targetid) != GetPlayerVehicleID(playerid)) return SendClientMessage(playerid, 0xFF0000AA, "That player is not in your vehicle!");
    {
        RemovePlayerFromVehicle(targetid);
    }
    return 1;
}

dcmd_admins(playerid, params[])
{
    new string[128], name[24];
    SendClientMessage(playerid, 0xFF0000AA, "Online Admins");
    for(new i = 0; i < MAX_PLAYERS; i++) if(IsPlayerConnected(i))
    {
        if(IsPlayerAdmin(i)) //Change to your admin system
        {
            GetPlayerName(i, name, sizeof(name));
            format(string, sizeof(string, "%s", name);
            SendClientMessage(playerid, COLOR_UKFGREEN, string);
        }
    }
    return 1;
}

dcmd_adslap(playerid, params[])
{
    new string[128], targetid = strval(params);
    if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, 0xFF0000AA, "Only for admins"); //Change IsPlayerAdmin to ur admin system
    {
        if(isnull(params)) return SendClientMessage(playerid, 0xFF0000AA, "USAGE: /adslap (id)");
        else if(!IsPlayerConnected(targetid) return SendClientMessage(playerid, 0xFF0000AA, "Player not found");
        {
            new Float:X, Float:Y, Float:Z;
            GetPlayerPos(targetid, X, Y, Z);
            GetPlayerPos(targetid, X, Y, Z + 10);
        }
    }
    return 1;
}
Reply


Messages In This Thread
Some commands - by James_Bourne - 14.08.2011, 13:50
Re: Some commands - by Darnell - 14.08.2011, 14:01
Re: Some commands - by Kingunit - 14.08.2011, 14:32
AW: Some commands - by Forbidden - 14.08.2011, 14:35
Re: Some commands - by suhrab_mujeeb - 14.08.2011, 14:39
Re: Some commands - by Laronic - 14.08.2011, 14:56
Re: Some commands - by James_Bourne - 14.08.2011, 15:08
Re: Some commands - by Laronic - 14.08.2011, 15:20
Re: Some commands - by CrazyShooterJoe - 14.08.2011, 15:54
Re: Some commands - by Laronic - 14.08.2011, 15:59
Re: Some commands - by CrazyShooterJoe - 14.08.2011, 16:02
Re: Some commands - by James_Bourne - 14.08.2011, 16:23
Re: Some commands - by suhrab_mujeeb - 15.08.2011, 08:48
Re: Some commands - by CrazyShooterJoe - 15.08.2011, 09:16
Re: Some commands - by suhrab_mujeeb - 15.08.2011, 12:41
Re: Some commands - by James_Bourne - 15.08.2011, 12:43
Re: Some commands - by CrazyShooterJoe - 18.08.2011, 09:17
Re: Some commands - by James_Bourne - 18.08.2011, 12:34
Re: Some commands - by CrazyShooterJoe - 18.08.2011, 17:11

Forum Jump:


Users browsing this thread: 7 Guest(s)