[POMOC] Ne radi mi komanda /cuff

Započeo xXxPored, Oktobar 19, 2011, 20:04:43 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Skripta koju koristim: moj edit
Detaljan opis problema: Ovako kad kucam /cuff pise da su igracu vec stavljene lisice!

Dio skripte: CMD:cuff(playerid, params[])
{
new string[128];
new idx;

new  sendername[MAX_PLAYER_NAME];
new  giveplayer[MAX_PLAYER_NAME];
    if(IsPlayerConnected(playerid))
    {
if(IsACop(playerid))
{
    temp = strtok(params, idx);
if(!strlen(temp)) {
SendClientMessage(playerid, COLOR_WHITE, "{168BFF}INFO: {959561} /cuff {959561}[ID/DioImena] {838361}");
return 1;
}
giveplayerid = ReturnUser(temp);
    if(IsPlayerConnected(giveplayerid))
{
    if(giveplayerid != INVALID_PLAYER_ID)
    {
        if(IsACop(giveplayerid))
        {
            SendClientMessage(playerid, COLOR_GREY, "   Ne mozes cuffovati PD/FBI/SWAT !");
        return 1;
        }
    if(PlayerCuffed[giveplayerid] > 0)
    {
        SendClientMessage(playerid, COLOR_GREY, "   Igracu su vec stavljene lisice !");
        return 1;
    }
if (ProxDetectorS(8.0, playerid, giveplayerid))
{
    new car = GetPlayerVehicleID(playerid);
    if(giveplayerid == playerid) { SendClientMessage(playerid, COLOR_GREY, "Ne mozes sam sebe cuffovati!"); 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), "%s ti je stavio lisice, sve dok ih on ne skine.", sendername);
SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "Stavio si lisice igracu %s.", giveplayer);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), " %s vadi lisice i stavlja ih %s.", sendername ,giveplayer);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
GameTextForPlayer(giveplayerid, "~r~Uhvacen", 2500, 3);
TogglePlayerControllable(giveplayerid, 0);
PlayerCuffed[giveplayerid] = 2;
PlayerCuffedTime[giveplayerid] = 180;
    }
    else
    {
        SendClientMessage(playerid, COLOR_GREY, "   Igrac nije u vozilu ili ti nisi vozac !");
        return 1;
    }
}
else
{
    SendClientMessage(playerid, COLOR_GREY, "   Taj igrac nije u tvojoj blizini !");
    return 1;
}
}
}
else
{
    SendClientMessage(playerid, COLOR_GREY, "   Taj igrac nije online!");
    return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, "   Nisi policajac / FBI / SWAT!");
}
}
return 1;
}

Neke slike: /

Hvala! :)
big respect 4 Blaeks Vuzimir  Shoorty Scripter HamZa


Vjerojatno moraš čekat da mu istekne tazer vrijeme ;)
Postaj komandu /tazer ili /ta kakogod..

Ma jok kad tazam sacekam dok prodje taz i opet pise

CMD:ta(playerid, params[])
{
new string[128];
new  giveplayer[MAX_PLAYER_NAME];
new  sendername[MAX_PLAYER_NAME];
    if(IsPlayerConnected(playerid))
    {
if(PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pLeader] == 3 || PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pLeader] == 2 ||PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1)
{
    if(IsPlayerInAnyVehicle(playerid))
    {
        SendClientMessage(playerid, COLOR_GREY, "   Ne mozes koristiti tazer dok si u vozilu !");
        return 1;
    }
    new suspect = GetClosestPlayer(playerid);
    if(IsPlayerConnected(suspect))
{
    if(PlayerCuffed[suspect] > 0)
    {
        SendClientMessage(playerid, COLOR_GREY, "   Igrac je vec tazovan/cuffovan !");
        return 1;
    }
    if(GetDistanceBetweenPlayers(playerid,suspect) < 5)
{
    if(PlayerInfo[suspect][pMember] == 3 || PlayerInfo[suspect][pLeader] == 3 || PlayerInfo[suspect][pMember] == 2 || PlayerInfo[suspect][pLeader] == 2 ||PlayerInfo[suspect][pMember] == 1 || PlayerInfo[suspect][pLeader] == 1)
    {
        SendClientMessage(playerid, COLOR_GREY, "   Ne mozes tazirati PD/FBI/SWAT !");
        return 1;
    }
    if(IsPlayerInAnyVehicle(suspect))
    {
        SendClientMessage(playerid, COLOR_GREY, "   Osumnjiceni je u vozilu !");
        return 1;
    }
    GetPlayerName(suspect, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* Sokirao te %s na 30 sekundi.", sendername);
SendClientMessage(suspect, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "* Sokirao si %s na 30 sekundi.", giveplayer);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "* %s vadi tazzer i cilja na  %s.", sendername ,giveplayer);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
format(string, sizeof(string), "* %s ispaljuje tazer na %s i pogadja.", 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] = 8;
            }
else
{
    SendClientMessage(playerid, COLOR_GREY, "   Nema nikoga u blizini!");
    return 1;
}
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, "   Nisi policajac  !");
}
}//not connected
    return 1;
}


Izvolite please help! :D
big respect 4 Blaeks Vuzimir  Shoorty Scripter HamZa

ukloni ovo
PlayerCuffed[suspect] = 1;
ili popravi taj timer koji resetira varijablu tj. uklanja taj tazz time
EDIT::
CMD:ta(playerid, params[])
{
new string[128];
new  giveplayer[MAX_PLAYER_NAME];
new  sendername[MAX_PLAYER_NAME];
    if(IsPlayerConnected(playerid))
    {
if(PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pLeader] == 3 || PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pLeader] == 2 ||PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1)
{
    if(IsPlayerInAnyVehicle(playerid))
    {
        SendClientMessage(playerid, COLOR_GREY, "   Ne mozes koristiti tazer dok si u vozilu !");
        return 1;
    }
    new suspect = GetClosestPlayer(playerid);
    if(IsPlayerConnected(suspect))
{
    if(PlayerCuffed[suspect] > 0)
    {
        SendClientMessage(playerid, COLOR_GREY, "   Igrac je vec tazovan/cuffovan !");
        return 1;
    }
    if(GetDistanceBetweenPlayers(playerid,suspect) < 5)
{
    if(PlayerInfo[suspect][pMember] == 3 || PlayerInfo[suspect][pLeader] == 3 || PlayerInfo[suspect][pMember] == 2 || PlayerInfo[suspect][pLeader] == 2 ||PlayerInfo[suspect][pMember] == 1 || PlayerInfo[suspect][pLeader] == 1)
    {
        SendClientMessage(playerid, COLOR_GREY, "   Ne mozes tazirati PD/FBI/SWAT !");
        return 1;
    }
    if(IsPlayerInAnyVehicle(suspect))
    {
        SendClientMessage(playerid, COLOR_GREY, "   Osumnjiceni je u vozilu !");
        return 1;
    }
    GetPlayerName(suspect, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* Sokirao te %s na 30 sekundi.", sendername);
SendClientMessage(suspect, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "* Sokirao si %s na 30 sekundi.", giveplayer);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "* %s vadi tazzer i cilja na  %s.", sendername ,giveplayer);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
format(string, sizeof(string), "* %s ispaljuje tazer na %s i pogadja.", 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] = 8;
            }
else
{
    SendClientMessage(playerid, COLOR_GREY, "   Nema nikoga u blizini!");
    return 1;
}
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, "   Nisi policajac  !");
}
}//not connected
    return 1;
}
Poslednja Izmena: Oktobar 19, 2011, 21:12:56 POSLE PODNE od Marijo B. - K4[Я]!K3™

E a gdje da stavim vrijeme trajanja tazza?
I jel ovo
TogglePlayerControllable(suspect, 0);
//PlayerCuffed[suspect] = 1;
PlayerCuffedTime[suspect] = 8;


Da stavim ovako pod ovim //
Poslednja Izmena: Oktobar 25, 2011, 00:58:42 PRE PODNE od DJeronimo
big respect 4 Blaeks Vuzimir  Shoorty Scripter HamZa