[HELP] /cuff
#3

100$ that's copypasted from godfather, please stop doing that and try coding yourself. It's horrible the way it is coded, I took some time and made it hawter. (my style)

pawn Код:
if(strcmp(cmd, "/cuff", true) == 0)
{
    tmp = strtok(cmdtext, idx);
    giveplayerid = ReturnUser(tmp);
    if (!strlen(tmp)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /cuff [Playerid/PartOfName]");
    if (GetPlayerTeam(playerid) != 11) return SendClientMessage(playerid, COLOR_GREY, "  You ain't no cop!");
    if (PlayerInfo[playerid][pRank] < 1) return SendClientMessage(playerid, COLOR_GREY, "  Your rank is too low!");
    if (IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_GREY, "  Cannot use this while being in the Car !");
    if (!IsPlayerConnected(giveplayerid)) return SendClientMessage(playerid, COLOR_GREY, "  That player is Offline !");
    if (GetPlayerTeam(giveplayerid) == 11) return SendClientMessage(playerid, COLOR_GREY, "  You can't Cuff Cops !");
    if (giveplayerid == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_GREY, "  Invalid player! !");
    if (giveplayerid == playerid) return SendClientMessage(playerid, COLOR_GREY, "  You cannot Cuff yourself!");
    if (ProxDetectorS(8.0, playerid, giveplayerid)) return SendClientMessage(playerid, COLOR_GREY, "  That player is not near you !");
    {
        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_LIGHTBLUE, string);
        format(string, sizeof(string), "* You Cuffed %s, till uncuff.", giveplayer);
       
        SendClientMessage(playerid, COLOR_LIGHTBLUE, 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_PURPLE,COLOR_PURPLE);
       
        GameTextForPlayer(giveplayerid, "~r~Cuffed", 2500, 3);
        TogglePlayerControllable(giveplayerid, 0);
        ApplyAnimation(giveplayerid,"ped","cower",1,1,0,0,0,0);
        ApplyAnimation(giveplayerid,"ped","cower",1,1,0,0,0,0);
        PlayerCuffed[giveplayerid] = 2;
        PlayerCuffedTime[giveplayerid] = 300;
    }
    return 1;
}
Reply


Messages In This Thread
[HELP] /cuff - by FreddeN - 21.07.2009, 11:14
Re: [HELP] /cuff - by MenaceX^ - 21.07.2009, 11:16
Re: [HELP] /cuff - by woot - 21.07.2009, 11:40
Re: [HELP] /cuff - by FreddeN - 21.07.2009, 12:08
Re: [HELP] /cuff - by woot - 21.07.2009, 15:44

Forum Jump:


Users browsing this thread: 2 Guest(s)