Smrt

Započeo DowSha, Novembar 04, 2017, 12:37:56 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 2 gostiju pregledaju ovu temu.

Skripta koju koristim:izvorna je gf
Detaljan opis problema:Full hp imam Slapam se poginem, odem fly poginem , padnem sa bicikla/motora poginem , skocim sa neke male kucice ili male visine poginem,kako se meni desi tako i drugim igracima.. nekad se desava nekad ne , da li neko zna sta je to i kako se moze rijesiti
Dio skripte: //
Neke slike/video za lakse dobivanje pomoci(neobavezno): objasnjeno je
TRAŽIM SKRIPTERA  PM ME !

Proveri da li  na [pawn]OnPlayerTakeDamage[/pawn] nemas nesto sto postavi  igracu hp na 0 kada primi dmg kojim slucajem, da ne prolazi mozda neku proveru sto nebi trebao da prodje. Isto tako sto je erovatno i slucaj ako si  definisao ponovo funckiju za postavljanje helta, mozda si tu zajebao stvar. Moze biti  mnostvo stvari kada je takva stvar u pitanju najbolje bi bilo da krenes od slap komande da vidis sta se kod nje desava jer je ona najkraca od svih ovih stvari. I naravno razlog smrti govori uglavnom  sve.


“Without requirements or design, programming is the art of adding bugs to an empty text file.” - Louis Srygley

Ovo je sve sto ima pod onplayerdamage

public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid, bodypart)
{
    new Float:Velocity[3];
    GetPlayerVelocity(playerid, Velocity[0], Velocity[1], Velocity[2]);
    new Float:health, Float:armor;
    GetPlayerHealth(playerid, health);
    GetPlayerArmour(playerid, armor);
    SetPlayerArmour(playerid, armor);
    SetPlayerHealth(playerid, health);
    // Testing line endings
    if(GetPVarInt(issuerid, "tookdamagefrom") == playerid)
    {
    SetPlayerArmour(playerid, GetPVarFloat(issuerid, "tookdamagefrom2"));
    SetPlayerHealth(playerid, GetPVarFloat(issuerid, "tookdamagefrom1"));
    DeletePVar(issuerid, "tookdamagefrom");
    DeletePVar(issuerid, "tookdamagefrom1");
    DeletePVar(issuerid, "tookdamagefrom2");
    }
    if(issuerid != INVALID_PLAYER_ID && weaponid == 34 && PlayerInfo[issuerid][pMember] == 6 && AdminDuty[playerid] == 0)
    {
        SetPlayerHealth(playerid, 0.0);
    }
//Tazer
    if(issuerid != INVALID_PLAYER_ID && weaponid == ORUZJE)
    {
    if(PlayerInfo[playerid][pWanted] == 0) return SCM(issuerid,0xFF8284FF,"ODBIJENO: Odabrani igrac nema wanted level - pokusajte na drugom igracu.");
    {
    if(PlayerInfo[issuerid][pMember] == 1)
    {
    new string1[200];
format(string1, sizeof(string1), "%s puca s tazerom te sokira %s.", GetName(issuerid), GetName(playerid));
ProxDetector(15.0, playerid, string1, 0xC6A2DEFF,0xC6A2DEFF,0xC6A2DEFF,0xC6A2DEFF,0xC6A2DEFF);

format(string1, sizeof(string1), "~r~%s", GAMETEXT);
GameTextForPlayer(playerid, string1, 2500, 3);
TogglePlayerControllable(playerid, 0);
PlayerInfo[playerid][pTazan] = 1;
if(!IsAblePedAnimation(playerid)) return 1;
    PlayAnimEx(playerid, "ped", "cower", 3.0, 1, 0, 0, 0, 0, 1);

taztimer[playerid] = SetTimerEx("Tazer", 300000, false, "i", playerid);
}
}
}
    return 1;
}

forward Tazer(playerid);
public Tazer(playerid)
{
    TogglePlayerControllable(playerid, 1);
    PlayerInfo[playerid][pTazan] = 0;
    return 1;
}
TRAŽIM SKRIPTERA  PM ME !

Citat: DowSha poslato Novembar 04, 2017, 12:46:11 POSLE PODNE
Ovo je sve sto ima pod onplayerdamage

public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid, bodypart)
{
    new Float:Velocity[3];
    GetPlayerVelocity(playerid, Velocity[0], Velocity[1], Velocity[2]);
    new Float:health, Float:armor;
    GetPlayerHealth(playerid, health);
    GetPlayerArmour(playerid, armor);
    SetPlayerArmour(playerid, armor);
    SetPlayerHealth(playerid, health);
    // Testing line endings
    if(GetPVarInt(issuerid, "tookdamagefrom") == playerid)
    {
    SetPlayerArmour(playerid, GetPVarFloat(issuerid, "tookdamagefrom2"));
    SetPlayerHealth(playerid, GetPVarFloat(issuerid, "tookdamagefrom1"));
    DeletePVar(issuerid, "tookdamagefrom");
    DeletePVar(issuerid, "tookdamagefrom1");
    DeletePVar(issuerid, "tookdamagefrom2");
    }
    if(issuerid != INVALID_PLAYER_ID && weaponid == 34 && PlayerInfo[issuerid][pMember] == 6 && AdminDuty[playerid] == 0)
    {
        SetPlayerHealth(playerid, 0.0);
    }
//Tazer
    if(issuerid != INVALID_PLAYER_ID && weaponid == ORUZJE)
    {
    if(PlayerInfo[playerid][pWanted] == 0) return SCM(issuerid,0xFF8284FF,"ODBIJENO: Odabrani igrac nema wanted level - pokusajte na drugom igracu.");
    {
    if(PlayerInfo[issuerid][pMember] == 1)
    {
    new string1[200];
format(string1, sizeof(string1), "%s puca s tazerom te sokira %s.", GetName(issuerid), GetName(playerid));
ProxDetector(15.0, playerid, string1, 0xC6A2DEFF,0xC6A2DEFF,0xC6A2DEFF,0xC6A2DEFF,0xC6A2DEFF);

format(string1, sizeof(string1), "~r~%s", GAMETEXT);
GameTextForPlayer(playerid, string1, 2500, 3);
TogglePlayerControllable(playerid, 0);
PlayerInfo[playerid][pTazan] = 1;
if(!IsAblePedAnimation(playerid)) return 1;
    PlayAnimEx(playerid, "ped", "cower", 3.0, 1, 0, 0, 0, 0, 1);

taztimer[playerid] = SetTimerEx("Tazer", 300000, false, "i", playerid);
}
}
}
    return 1;
}

forward Tazer(playerid);
public Tazer(playerid)
{
    TogglePlayerControllable(playerid, 1);
    PlayerInfo[playerid][pTazan] = 0;
    return 1;
}

jedino sniper postavlja mu na 0 hp
TRAŽIM SKRIPTERA  PM ME !