Balkan SA:MP

PAWN skriptanje, gamemodovi, filterskripte, include fajlovi, mape, pluginovi => Razgovor u vezi PAWN - skriptanja => Temu započeo: sch poslato Oktobar 01, 2012, 17:00:30 POSLE PODNE

Naslov: [Pomoć!] 0.3e Lisice. ( /uncuff )
Poruka od: sch poslato Oktobar 01, 2012, 17:00:30 POSLE PODNE
Skripta koju koristim: My Edit.
Detaljan opis problema: KAda sam dodao SPECIAL_ACTION_CUFFED i on mu sve lijepo stavi,ali kada kucam /uncuff ne znam kako da mu makne to dane drži ruke... Lisice znam maknut sa RemoveAttachedObject,ali ovo da prestane koristit SPECAIAL_ACTION_CUFFED ne znam,ako nije problem mi to pomoć! Evo vam cmd : Uncuff
Dio skripte:


if(strcmp(cmd, "/uncuff", true) == 0)
{
    if(GetPVarInt(playerid, "gPlayerLogged") != 0)
    {
if(gTeam[playerid] == 2 || IsACop(playerid))
{
    tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) {
SendClientMessage(playerid, COLOR_WHITE, "KORISTENJE: /uncuff [Playerid/DioImena]");
return 1;
}
giveplayerid = ReturnUser(tmp);
if(GetPVarInt(giveplayerid, "Spectate") != 255)
{
    SendClientMessage(playerid, COLOR_GRAD1, "   Taj igrac nije dovoljno blizu vas.");
return 1;
}
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
    if (ProxDetectorS(8.0, playerid, giveplayerid))
{
    if(giveplayerid == playerid)
{
    SendClientMessage(playerid, COLOR_GREY, "Ne mozes skiniti lisice sam sebi!");
return 1;
}
if(GetPVarInt(giveplayerid, "PlayerCuffed") == 2)
{
    GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
    format(string, sizeof(string), "* Skinio vam je lisice  %s.", sendername);
SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "* Skinili ste lisice sa %s.", giveplayer);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
GameTextForPlayer(giveplayerid, "~g~Slobodan", 2500, 3);
RemovePlayerAttachedObject(playerid,1);
SetPVarInt(giveplayerid, "PlayerCuffed", 0);

if(GetPVarInt(giveplayerid, "CuffTimerCalled") == 1)
{
KillTimer(GetPVarInt(giveplayerid, "cufftimer"));
SetPVarInt(giveplayerid, "CuffTimerCalled", 0);
}
}
else
    SendClientMessage(playerid, COLOR_RED, "   Taj igrac nije zavezan !");
}
else
    SendClientMessage(playerid, COLOR_RED, "   Taj igrac nije blizu vas !");
}
}
else
    SendClientMessage(playerid, COLOR_RED, "   Taj igrac nije online !");
}
else
SendClientMessage(playerid, COLOR_RED, "   Niste policajac / FBI !");
}
return 1;
}

Neke slike/video za lakse dobivanje pomoci(neobavezno):
Naslov: Odg: [Pomoć!] 0.3e Lisice. ( /uncuff )
Poruka od: Kopra poslato Oktobar 01, 2012, 17:44:48 POSLE PODNE
Dodaj ovo u cuff komandu:

for(new i=0; i<MAX_PLAYER_ATTACHED_OBJECTS; i++)
        {
            if(IsPlayerAttachedObjectSlotUsed(playerid, i)) RemovePlayerAttachedObject(playerid, i);
        }
Naslov: Odg: [Pomoć!] 0.3e Lisice. ( /uncuff )
Poruka od: ...Nikola... poslato Oktobar 01, 2012, 17:47:34 POSLE PODNE
Ja koliko sam procitao lepo njegov post njemu je problem jer nece da mu prekine animaciju a ne da mu skine objekat...

ti u uncuff cmd dodaj SetPlayerSpecialAction(giveplayerid, SPECIAL_ACTION_NONE); ako u cuff imas ovako SetPlayerSpecialAction(giveplayerid,SPECIAL_ACTION_CUFFED);
Naslov: Odg: [Pomoć!] 0.3e Lisice. ( /uncuff )
Poruka od: sch poslato Oktobar 01, 2012, 19:51:46 POSLE PODNE
Riješio sam ja odmah minut nakon što sam postavio,skontao sam odmah,u svakom slučaju hvala vam! ;)


LOCK!