Ne tazuje igraca

Započeo #Kiki
20. Feb. 2020. Zaključano
1,666
pregleda
4
postova
zbEngli
2
Street Runner
20. Feb. 2020.
Skripta koju koristim : Unicate Gaming edit
Problem : imam problem , znaci kad PD uzme vadi tazer i puca u igraca uopste se nista ne desava nit freeza nit ga obori .. Ne znam u cemu je problem help sto pre ako moze
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid)
{
if(IgracPolicajac(issuerid))
{
if(GetPlayerWeapon(issuerid) == 23)
{
new string;
if(PlayerInfo == 0) return SCM(issuerid,-1,""PLAVA" "SIVA"Igrac nema Wanted Level!");
if(IgracPolicajac(playerid)) return SCM(issuerid,-1,""PLAVA"INFO | "SIVA"Ne mozes tazovati PD!");
if(PlayerInfo == 0) return SCM(issuerid,-1,""PLAVA"INFO | "SIVA"Suspendovan si!");
if(AdminDuty == 1) return SCM(issuerid,-1,""PLAVA"INFO | "SIVA"Taj igrac je Admin na duznosti!");
format(string, sizeof(string), "%s puca tazerom na %s-a i pogadja ga.", GetName(issuerid) ,GetName(playerid));
ProxDetector(20.0, issuerid, string, PROX,PROX,PROX,PROX,PROX);
TogglePlayerControllable(playerid, 0); IgracTazovan = 1;
TazerTimer = SetTimerEx("TazovanTajmer", 15000, false, "i", playerid);
OnePlayAnim(playerid, "CRACK", "crckdeth2", 4.0, 1, 0, 0, 0, 0);
}
}
return 1;
}
Jaksic
5
Underboss
21. Feb. 2020.
Imas includovan weapon-config?
zbEngli
2
Street Runner
21. Feb. 2020.
Imam includovan Weapon-config
Ljubisa
4
Shot Caller
21. Feb. 2020.
# How to use

1. `#include ` before any other script
2. Replace `OnPlayerGiveDamage` and `OnPlayerTakeDamage` with just one callback:
   
    ```pawn
    public OnPlayerDamage(&playerid, &Float:amount, &issuerid, &weapon, &bodypart)
    ```
3. Add config functions in `OnGameModeInit` (or any other places, they can be called at any time).
    **Recommended**:
   
    ```pawn
    public OnGameModeInit() {
        SetVehiclePassengerDamage(true);
        SetDisableSyncBugs(true);
    }
    ```


Tu ti lepo pise sta treba da uradis.

- Ukratko pre svakog includea posle a_samp includeaj weapon config i takodje SKY jer ti je potreban uz weapon config
- Zameni callback OnPlayerGiveDamage i OnPlayerTakeDamage sa
public OnPlayerDamage(&playerid, &Float:amount, &issuerid, &weapon, &bodypart)

- U trecem koraku samo ubaci tu funkciju kod OnGameModeInit ili bilo gde gde ta funkcija moze biti pozvana (moze a i ne mora ali se preporucuje).

Morate biti prijavljeni da biste odgovorili na ovu temu.

Prijava

© 2026 SmartShark. All rights reserved.

Powered by Momentum|v2026.3.001 Alpha