koristi drogu sistem

Započeo mikic1234, Avgust 06, 2022, 22:34:01 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Kada ukucam koristidrogu izbaci mi nemas droge i kad imam i kad nemam

CMD:koristidrogu(playerid, const params[])
{
   if( PlayerDrugged[ playerid ]) return GRESKA( playerid, "Vec si nadrogiran.Ne mozes koristiti drogu dok si nadrogiran!");
    if( IsPlayerInAnyVehicle( playerid ) ) return GRESKA( playerid, "Ne mozes da se drogiras dok si u kolima." );
    if( PlayerInfo[ playerid][ xZatvor ] ) return GRESKA( playerid, "Ne mozete se drogirati , dok ste u zatvoru!" );
   if( PlayerInfo[ playerid ][ xDrogaKod ] == 0 || PI[playerid][xDroga] == 0) return GRESKA(playerid, "Nemas droge");
    PlayerInfo[ playerid ][ xDroga ] -= 5;
    ApplyAnimation(playerid, "SWEET", "Sweet_injuredloop", 4.0, 1, 0, 0, 0, 0);
   SetPlayerSpecialAction( playerid,21);
   PlayerStoned[ playerid ] = true;
   PlayerDrugged[ playerid ] = true;
   SetPlayerTime( playerid, 12, 0);
   SetPlayerDrunkLevel( playerid, 10000);
   SetPVarInt( playerid, "PlayerDruggedSeconds", 5 );
   SetPlayerWeather( playerid, -66 );
   DodajIgracuArmour( playerid, 25 );

   format( globalstring, sizeof( globalstring ), "%s pocinje koristiti drogu.", ImeIgraca( playerid ) );

   PorukaRadius(15.0, playerid, globalstring, LJUBICASTA );
   return true;
}

Provjeri koji ti se vrijednosti cuvaju u varijablama xdrogakod i xdroga

Citat: Galardo poslato Avgust 06, 2022, 23:46:09 POSLE PODNE
Provjeri koji ti se vrijednosti cuvaju u varijablama xdrogakod i xdroga
xdroga valjda

[pawn]if( PlayerInfo[ playerid ][ xDrogaKod ] == 0 || PI[playerid][xDroga] == 0) return GRESKA(playerid, "Nemas droge");[/pawn]

Nije mi jasno ovo PI i PlayerInfo, jel ti new definisan kao PlayerInfo[MAX_PLAYERS][xPlayerInfo(kako vec)] ili PI[MAX_PLAYERS][xPlayerInfo(kako vec)]?
SPEED HACK (C++) https://github.com/nouddy/samp-speed-hack
Reliant GameMode (open.mp) https://github.com/nouddy/reliant-omp
SA:MP Landing Page https://github.com/nouddy/samp-landing-page


Kolko drama ima u 7 grama