[Pomoc] Tazer

Započeo BOSNIACUS, Januar 05, 2011, 15:11:25 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Ovako, zelim kad pukenm nekog tazerom da on pada sa animacijom

if(strcmp(cmd, "/tazer", true) ==0 || strcmp(cmd, "/ta", true) ==0)
{
    if(IsPlayerConnected(playerid))
    {
if(gTeam[playerid] == 2 || IsACop(playerid))
{
    if(IsPlayerInAnyVehicle(playerid))
    {
        SendClientMessage(playerid, COLOR_GREY, " ! U autu ste , izadjite van");
        return 1;
    }
if(KnockedDown[playerid] == 1)
{
SendClientMessage(playerid, COLOR_GREY, " ! Oboreni ste ne mozete pucati tazerom");
return 1;
}
if(PlayerTied[playerid] == 1)
{
SendClientMessage(playerid, COLOR_GREY, "   Vezani ste!");
return 1;
}
            if(ReduceTime[playerid] == 1)
            {
                SendClientMessage(playerid, COLOR_GREY, "   Tazer se jos nije napunio (5 sekundi)");
                return 1;
            }
    new suspect = GetClosestPlayer(playerid);
    if(IsPlayerConnected(suspect))
{
    if(PlayerCuffed[suspect] > 0)
    {
        SendClientMessage(playerid, COLOR_GREY, "   Osumnjiceno je vec tazovan/vezan");
        return 1;
    }
    if(GetDistanceBetweenPlayers(playerid,suspect) < 5)
{
    if(gTeam[suspect] == 2)
    {
        SendClientMessage(playerid, COLOR_GREY, "   Ne mozete tazat PD / FBI!");
        return 1;
    }
    if(IsPlayerInAnyVehicle(suspect))
    {
        SendClientMessage(playerid, COLOR_GREY, "   Osumnjiceni je u autu, prvo ga izbacite!");
        return 1;
    }
    GetPlayerName(suspect, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
new randt = random(4)+1;
if(randt == 1)
{
    format(string, sizeof(string), "* %s puca sa svojim tazerom na %s-a, ali promasuje.", sendername ,giveplayer);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
}
else
{
format(string, sizeof(string), "* Tazovao vas je %s na 10 sekundi.", sendername);
SendClientMessage(suspect, COLOR_WHITE, string);
format(string, sizeof(string), "* Tazovali ste %s-a na 10 sekundi.", giveplayer);
SendClientMessage(playerid, COLOR_WHITE, string);
format(string, sizeof(string), "* %s puca tazerom na %s-a i pogadja ga.", sendername ,giveplayer);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
GameTextForPlayer(suspect, "~r~Sokiran", 2500, 3);
TogglePlayerControllable(suspect, 0);
PlayerCuffed[suspect] = 1;
PlayerCuffedTime[suspect] = 15;
ApplyAnimation(suspect,"CRACK","crackdeth2",4.0, 1, 0, 0, 0, 0);
                ReduceTime[playerid] = 1;
                SetTimerEx("ReduceTimer", 5000, false, "i", playerid);
}
            }
else
{
    SendClientMessage(playerid, COLOR_GREY, "   Nema nikoga u vasoj blizini!");
    return 1;
}
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, "   Niste Policajac / FBI!");
}