Cuffing players outside PD vehicles [SOLVED]
#3

Thanks for the fast Reply!
Here it is,

if(strcmp(cmd, "/cuff", true) == 0 || strcmp(cmd, "/cu", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(gTeam[playerid] == 2 || IsACop(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) {
SendClientMessage(playerid, COLOR_WHITE, "USAGE: /cuff [Playerid/PartOfName]");
return 1;
}
giveplayerid = ReturnUser(tmp);
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
if(gTeam[giveplayerid] == 2 || IsACop(giveplayerid))
{
SendClientMessage(playerid, COLOR_GREY, " You can't Cuff Cops !");
return 1;
}
if(PlayerCuffed[giveplayerid] > 0)
{
SendClientMessage(playerid, COLOR_GREY, " Player already Cuffed !");
return 1;
}
if (ProxDetectorS(8.0, playerid, giveplayerid))
{
new car = GetPlayerVehicleID(playerid);
if(giveplayerid == playerid) { SendClientMessage(playerid, COLOR_GREY, "You cannot Cuff yourself!"); return 1; }
if(IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == 2 && IsPlayerInVehicle(giveplayerid, car))
{
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* You were Cuffed by %s, till uncuff.", sendername);
SendClientMessage(giveplayerid, COLOR_WHITE, string);
format(string, sizeof(string), "* You Cuffed %s, till uncuff.", giveplayer);
SendClientMessage(playerid, COLOR_WHITE, string);
format(string, sizeof(string), "* %s Hand Cuffs %s, so he wont go anywhere.", sendername ,giveplayer);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPL E,COLOR_PURPLE);
GameTextForPlayer(giveplayerid, "~r~Cuffed", 2500, 3);
TogglePlayerControllable(giveplayerid, 0);
PlayerCuffed[giveplayerid] = 2;
PlayerCuffedTime[giveplayerid] = 99999999999999;
Reply


Messages In This Thread
Cuffing players outside PD vehicles [SOLVED] - by Lexuss - 22.02.2010, 18:17
Re: Cuffing players outside PD vehicles - by Torran - 22.02.2010, 18:19
Re: Cuffing players outside PD vehicles - by Lexuss - 22.02.2010, 18:22
Re: Cuffing players outside PD vehicles - by Onyx09 - 22.02.2010, 18:34
Re: Cuffing players outside PD vehicles - by Lexuss - 22.02.2010, 18:36
Re: Cuffing players outside PD vehicles - by Lexuss - 22.02.2010, 18:42
Re: Cuffing players outside PD vehicles - by Lexuss - 22.02.2010, 18:48
Re: Cuffing players outside PD vehicles - by adsy - 22.02.2010, 19:58
Re: Cuffing players outside PD vehicles - by Torran - 22.02.2010, 20:00
Re: Cuffing players outside PD vehicles -Help?- - by adsy - 22.02.2010, 20:01

Forum Jump:


Users browsing this thread: 3 Guest(s)