[POMOC] Tazer pistol.

Započeo Harrson, Maj 27, 2012, 22:53:27 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 2 gostiju pregledaju ovu temu.

Skripta koju koristim: Moj mod od 0
Detaljan opis problema: Kako da naprevim, ako igrac ima WL, da ga policija more tazati i automatski cuffati  sa "Pistoljom". Znaci puca ga pistoljom i tazar i cuffa ga automatski.
Dio skripte:
Neke slike/video za dobivanje pomoci(neobavezno):

if(strcmp(cmd, "/tazer", true) ==0)
{
    if(IsPlayerConnected(playerid))
    {
if(PlayerInfo[playerid][pMember] == 1||PlayerInfo[playerid][pLeader] == 1)
{
    if(IsPlayerInAnyVehicle(playerid))
    {
        SendClientMessage(playerid, COLOR_LIGHTRED, "ERROR: Nemozete koristiti ovu Komandu - jer je Osoba u Autu.");
        return 1;
    }
    new suspect = GetClosestPlayer(playerid);
    if(IsPlayerConnected(suspect))
{
    if(PlayerCuffed[suspect] == 2)
    {
        SendClientMessage(playerid, COLOR_LIGHTRED, "ERROR: Odabrana osoba vec ima lisice na sebi.");
        return 1;
    }
    if(GetDistanceBetweenPlayers(playerid,suspect) < 5)
{
    if(PlayerInfo[suspect][pMember] == 1)
    {
        SendClientMessage(playerid, COLOR_LIGHTRED, "ERROR: Nemozete sokirati svog Kolegu - prijavi te ga Lideru na PM, ako Problema ima.");
        return 1;
    }
    if(IsPlayerInAnyVehicle(suspect))
    {
        SendClientMessage(playerid, COLOR_LIGHTRED, "ERROR: Odabrana osoba je u vozilu - izbacite ju iz vozila.");
        return 1;
    }
    GetPlayerName(suspect, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s vadi palicu te sokira %s.", sendername ,giveplayer);
ProxDetector(10.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
GameTextForPlayer(suspect, "~r~Taziran si.", 2500, 3);
TogglePlayerControllable(suspect, 0);
PlayerCuffed[suspect] = 1;
PlayerCuffedTime[suspect] = 10;
            }
else
{
    SendClientMessage(playerid, COLOR_LIGHTRED, "ERROR: Odabrani igrac nije u vasoj blizini.");
    return 1;
}
}
}
else
{
SendClientMessage(playerid, COLOR_LIGHTRED, "ERROR: Niste autorizirani za koristenje ove komande - samo policija.");
}
}//not connected
    return 1;
}


if(strcmp(cmd, "/cuff", true) == 0)
{
    if(IsPlayerConnected(playerid))
    {
if(PlayerInfo[playerid][pMember] == 1||PlayerInfo[playerid][pLeader] == 1)
{
       tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) {
SendClientMessage(playerid, COLOR_DGOLD, "KORISTENJE: /cuff [Playerid/DioImena]");
return 1;
}
giveplayerid = ReturnUser(tmp);
    if(IsPlayerConnected(giveplayerid))
{
    if(giveplayerid != INVALID_PLAYER_ID)
    {
        if(PlayerInfo[giveplayerid][pMember] == 1)
        {
            SendClientMessage(playerid, COLOR_LIGHTRED, "ERROR: Nemozete cuffati svog Kolegu - prijavi te ga Lideru na PM, ako Problema ima.");
        return 1;
        }
        if(PlayerCuffed[giveplayerid] == 0)
        {
        SendClientMessage(playerid, COLOR_GREY, "ERROR: Osoba mora biti sokirana da bi joj stavili lisice.");
        return 1;
        }
    if (ProxDetectorS(8.0, playerid, giveplayerid))
{
      GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* Policajac %s vadi lisice te ih stavlja na %s.", sendername ,giveplayer);
ProxDetector(10.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
        ApplyAnimation(giveplayerid,"ped", "cower", 3.0, 1, 0, 0, 0, 0); // Gun Arrest
TogglePlayerControllable(giveplayerid, 0);
PlayerCuffed[giveplayerid] = 2;
PlayerCuffedTime[giveplayerid] = 300;
}
else
{
    SendClientMessage(playerid, COLOR_LIGHTRED, "ERROR: Odabrani igrac nije u vasoj blizini.");
    return 1;
}
}
}
else
{
    SendClientMessage(playerid, COLOR_LIGHTRED, "ERROR: Odabrani igrac nije ulogiran ili je offline.");
    return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_LIGHTRED, "ERROR: Niste autorizirani za koristenje ove komande - samo policija.");
}
}
return 1;
}