Hey, My /detain doesent work. Help me please!
#2

pawn Код:
CMD:detain(playerid, params[])
{
    new playerb, seatid, string[128];
    if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
    if(!IsACop(playerid) && !IsFBI(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You are not an LSPD Oficer/FBI Agent.");
    if(sscanf(params, "ui", playerb, seatid)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /detain [playerid] [seatid]");
    if(!IsPlayerLoggedIn(playerb)) return SendClientMessage(playerid, COLOR_GREY, "Invalid player id.");
    if(!IsPlayerNearPlayer(playerid, playerb, 2)) return SendClientMessage(playerid, COLOR_GREY, "You can't detain someone from this disatance.");
    if(!IsPlayerCuffed(playerb)) return SendClientMessage(playerid, COLOR_GREY, "Player is not cuffed.");
    if(!IsCruiser(LastCar[playerid])) return SendClientMessage(playerid, COLOR_GREY, "You need an LSPD crusier to detain someone in.");
    if(seatid < 2 || seatid > 3) return SendClientMessage(playerid, COLOR_GREY, "You can only detain people in seats 2 and 3.");
    PutPlayerInVehicle(playerb//what is this ?????, LastCar[playerid], seatid);
    format(string, sizeof(string), "* %s grabs %s from their cuffs and throws him inside the LSPD cruiser.", RPN(playerid), RPN(playerb));
    SendNearbyMessage(playerid, 15, string, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
    return 1;
}
Reply


Messages In This Thread
Hey, My /detain doesent work. Help me please! - by EkaFist - 12.07.2013, 14:32
Re: Hey, My /detain doesent work. Help me please! - by xganyx - 12.07.2013, 14:38
Re: Hey, My /detain doesent work. Help me please! - by EkaFist - 12.07.2013, 15:32
Re: Hey, My /detain doesent work. Help me please! - by EkaFist - 12.07.2013, 16:56
Re: Hey, My /detain doesent work. Help me please! - by dominik523 - 12.07.2013, 17:25
Re: Hey, My /detain doesent work. Help me please! - by EkaFist - 13.07.2013, 08:55

Forum Jump:


Users browsing this thread: 1 Guest(s)