Why this CMD dont work ?
#1

PHP код:
CMD:detain(playeridparams[])
{
    new 
playerbseatidstring[128];
    if(!
IsPlayerLoggedIn(playerid)) return SendClientMessage(playeridCOLOR_GREY"You need to login first before using any command.");
    if(!
IsACop(playerid) && !IsFBI(playerid)) return SendClientMessage(playeridCOLOR_GREY"You are not an BCPD Oficer/FBI Agent.");
    if(
sscanf(params"ui"playerbseatid)) return SendClientMessage(playeridCOLOR_WHITE"[Usage]: /detain [playerid] [seatid]");
    if(!
IsPlayerLoggedIn(playerb)) return SendClientMessage(playeridCOLOR_GREY"Invalid player specified.");
    if(!
IsPlayerNearPlayer(playeridplayerb2)) return SendClientMessage(playeridCOLOR_GREY"You can't detain someone from this disatance.");
    if(!
IsPlayerCuffed(playerb)) return SendClientMessage(playeridCOLOR_GREY"Player is not cuffed.");
    if(
seatid || seatid 3) return SendClientMessage(playeridCOLOR_GREY"You can only detain people in seats 2 and 3.");
    
PutPlayerInVehicle(playerbLastCar[playerid], seatid);
    
format(stringsizeof(string), "* %s grabs %s from their cuffs and throws him inside the BCPD cruiser."RPN(playerid), RPN(playerb));
    
SendNearbyMessage(playerid15stringCOLOR_PURPLECOLOR_PURPLECOLOR_PURPLECOLOR_PURPLECOLOR_PURPLE);
    return 
1;

This is under onplayerexitvehicle
PHP код:
    if(PlayerInfo[playerid][pFac] == && PlayerInfo[playerid][pFac] == && PlayerInfo[playerid][pFac] == 6)
    {
        
LastCar[playerid] = vehicleid;
    } 
When a cop try it the suspect isnt thrown in the car
Reply


Messages In This Thread
Why this CMD dont work ? - by barts - 12.01.2014, 09:56
Re: Why this CMD dont work ? - by Voxel - 12.01.2014, 10:03
Re: Why this CMD dont work ? - by xZdadyZx - 12.01.2014, 10:06
Re: Why this CMD dont work ? - by barts - 12.01.2014, 10:44
Re: Why this CMD dont work ? - by barts - 12.01.2014, 11:24
Re: Why this CMD dont work ? - by barts - 12.01.2014, 16:10
Re: Why this CMD dont work ? - by xZdadyZx - 12.01.2014, 16:44

Forum Jump:


Users browsing this thread: 2 Guest(s)