[POMOC] DB

Započeo Danisha, Februar 02, 2013, 12:15:06 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 3 gostiju pregledaju ovu temu.

Skripta koju koristim:Ravens
Detaljan opis problema:kako da sredim kada igrac sjedne u kola da mu nestane gun pa kada izadje da mu se vrati posto kada sjednu na motor a imaju npr tec oni mogu da pucaju sa motora i rade DB???
Dio skripte:////
Neke slike/video za lakse dobivanje pomoci(neobavezno): ////

stavi na vrh ovo new GunSlot[MAX_PLAYERS][5];
new GunAmmo[MAX_PLAYERS][5];
pod onplayerentervehicle // neka GunSlot[1] sluzi za pistolje, GunSlot[2] za mp5, GunSlot[3] za ak47/m4 i GunSlot[4] za Shotgun (ostalim gunovima ne mozes pucati ja mslm iz auta

new ammo;
if(GetPlayerWeapon(playerid) == 24) { ammo = GetPlayerAmmo(playerid); GunSlot[playerid][1] = 24; GunAmmo[playerid][1] = ammo; } //za eagle
if(GetPlayerWeapon(playerid) == 22) { ammo = GetPlayerAmmo(playerid); GunSlot[playerid][1] = 22; GunAmmo[playerid][1] = ammo; } //za clot
if(GetPlayerWeapon(playerid) == 23) { ammo = GetPlayerAmmo(playerid); GunSlot[playerid][1] = 23; GunAmmo[playerid][1] = ammo; } //za scilenced pistol
if(GetPlayerWeapon(playerid) == 29) { ammo = GetPlayerAmmo(playerid); GunSlot[playerid][2] = 29; GunAmmo[playerid][2] = ammo; } //za mp5
if(GetPlayerWeapon(playerid) == 30) { ammo = GetPlayerAmmo(playerid); GunSlot[playerid][3] = 30; GunAmmo[playerid][3] = ammo; } //za ak47
if(GetPlayerWeapon(playerid) == 31) { ammo = GetPlayerAmmo(playerid); GunSlot[playerid][3] = 31; GunAmmo[playerid][3] = ammo; } //za m4
if(GetPlayerWeapon(playerid) == 25) { ammo = GetPlayerAmmo(playerid); GunSlot[playerid][4] = 25; GunAmmo[playerid][4] = ammo; } //za shotgun
ResetPlayerWeapons(playerid);

//dodaj proveru za jos koje oruzje ako hoces


i pod onplayerexitvehicle GivePlayerWeapon(playerid, GunSlot[playerid][1], GunAmmo[playerid][1]);
GivePlayerWeapon(playerid, GunSlot[playerid][2], GunAmmo[playerid][2]);
GivePlayerWeapon(playerid, GunSlot[playerid][3], GunAmmo[playerid][3]);
GivePlayerWeapon(playerid, GunSlot[playerid][4], GunAmmo[playerid][4]);
GunSlot[playerid][1] = 0; GunAmmo[playerid][1] = 0;
GunSlot[playerid][2] = 0; GunAmmo[playerid][2] = 0;
GunSlot[playerid][3] = 0; GunAmmo[playerid][3] = 0;
GunSlot[playerid][4] = 0; GunAmmo[playerid][4] = 0;

Nevalja to naso sam ovo na netu dobro je bas kako zelim

if(newstate == PLAYER_STATE_DRIVER)
{
       SetPlayerArmedWeapon(playerid, 0);