Yes I need a Bind Keys Function
to cuff a player like in vccnr
you need to near a player to cuff him
And
Getcar Fixed
to spawn car anytime
even you get enter and then get out of car
I cant do bind keys, but i can do cmd /c cuff (if you want help with /c arrest, i can help you)
Put this on top of your gamemode
[pawn]new Acent;
Acent < 92;
new PlayerCuffed[Acent];[/pawn]
[pawn]public OnPlayerConnect(playerid)
{
PlayerCuffed[playerid] = 0;
return 1;
}[/pawn]
[pawn]OnPlayerCommandText(playerid, cmdtext)
{
new cmd;
new idx;
cmd = strtok(cmdtext, idx);
{
if (strcmp(cmd, "cuff",true)==0)
{
new tmp, plr;
tmp = strtok(cmdtext, idx), plr = FindPlayerIDFromString(tmp);
if (!IsPlayerCop(playerid)) SendClientMessage(playerid, COLOR_GREEN, "You are not a cop");
else if (!strlen(tmp)) SendClientMessage(playerid, COLOR_GREEN, "USAGE: /c cuff [playername/playerid]");
else if (!IsOwnedCuff(playerid)) SendClientMessage(playerid, COLOR_GREEN, "You do not have a cuff. Please get one at VCPD);//THIS IS OPTIONAL, ONLY USE THIS IF YOU WANT A FUNCTION THAT IF PLAYER HAS CUFF THEN HE CAN CUFF
else if (!IsPlayerConnected(plr)) SendClientMessage(playerid, COLOR_GREEN, "Error: Invalid player");
else if (GetPlayerDistance(playerid, plr)>=51) SendClientMessage(playerid, COLOR_RED, "You have to be closer to that player");//YOU NEED GUPS FOR THAT, IF YOU DONT HAVE COPY FROM THERE
else if (IsPlayerCop(plr)) SendClientMessage(playerid, COLOR_RED, "You can not cuff a cop");
else
{
PlayerCuffed[plr] = 1;
TogglePlayerControllable(plr, 0);
}
}
}
}[/pawn]
[pawn]public IsPlayerCop(playerid)
{
if (PlayerSkin[playerid] = 0) return 1;//REPLACE 0 WITH THE COP SKIN ID'S
if (PlayerSkin[playerid] = 0) return 1;//REPLACE 0 WITH THE COP SKIN ID'S
if (PlayerSkin[playerid] = 0) return 1;//REPLACE 0 WITH THE COP SKIN ID'S
if (PlayerSkin[playerid] = 0) return 1;//REPLACE 0 WITH THE COP SKIN ID'S
if (PlayerSkin[playerid] = 0) return 1;//REPLACE 0 WITH THE COP SKIN ID'S
if (PlayerSkin[playerid] = 0) return 1;//REPLACE 0 WITH THE COP SKIN ID'S
if (PlayerSkin[playerid] = 0) return 1;//REPLACE 0 WITH THE COP SKIN ID'S
}[/pawn]
Dont forget to give me credits!
I will give you getcar soon but i have bug fixed.Here is getcar
[pawn] else if ( strcmp( cmd, "!getcar", true ) == 0 )
{
new Float:Angle;
GetPlayerPos( playerid, x, y, z); GetPlayerFacingAngle( playerid,Angle);
if ( tmp > MAX_VEHICLES || tmp < 0) SendClientMessage( playerid, COLOR_GREEN, "Error: Invalid vehicle!" );
SetVehiclePos( strval( tmp ),x+3,y+3,z,Angle);
SetVehiclePos( strval( tmp ),x+3,y+3,z,Angle);
PutPlayerInVehicle(playerid,strval( tmp ));
format( szMsg, sizeof( szMsg ), "Spawning vehicle:[ %d ]", strval( tmp ) );
SendClientMessage( playerid, COLOR_GREEN, szMsg );
return 1;
}[/pawn]
Please give me credits if you wont i wont help you anymore