Započeo #Kiki
•20. Feb. 2020.• ZaključanoNe tazuje igraca
1,699
pregleda
4
postova
Street Runner
Balkan SA:MP
SA-MP Doprinos
Balkan SA:MP
SA-MP DoprinosNovi Član
90 / 100 XP
Početnik(0)
19
Postovi:
9
Teme:
Pridružio se:Sep. 2016
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
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;
}Shot Caller
Balkan SA:MP
SA-MP Doprinos
Balkan SA:MP
SA-MP DoprinosNovi Član
75 / 100 XP
Početnik(0)
113
Postovi:
4
Teme:
Pridružio se:Sep. 2018
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