/detain command
#1

Hey, uhmm i need help with the /detain command. There are no compilation errors, but when i try In Game it says
"You need an LSPD crusier to detain someone in."
And i do have a LSPD cruiser, but its just not detaining him..
Here is the command

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 LSPD 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 id.");
    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(!
IsCruiser(LastCar[playerid])) return SendClientMessage(playeridCOLOR_GREY"You need an LSPD cruiser to detain someone in.");
    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 LSPD cruiser."RPN(playerid), RPN(playerb));
    
SendNearbyMessage(playerid15stringCOLOR_PURPLECOLOR_PURPLECOLOR_PURPLECOLOR_PURPLECOLOR_PURPLE);
    return 
1;

Reply


Messages In This Thread
/detain command - by mrkemal70 - 20.07.2014, 09:14
Re: /detain command - by GeekSiMo - 20.07.2014, 09:17
Re: /detain command - by mrkemal70 - 20.07.2014, 09:18
Re: /detain command - by GeekSiMo - 20.07.2014, 09:21
Re: /detain command - by mrkemal70 - 20.07.2014, 09:22
Re: /detain command - by GeekSiMo - 20.07.2014, 09:24
Re: /detain command - by mrkemal70 - 20.07.2014, 09:25
Re: /detain command - by GeekSiMo - 20.07.2014, 09:28
Re: /detain command - by mrkemal70 - 20.07.2014, 09:29
Re: /detain command - by GeekSiMo - 20.07.2014, 09:30

Forum Jump:


Users browsing this thread: 1 Guest(s)