[Pitanje] Switch case (sve osim...)
Results 1 to 9 of 9
  1. #1
    Senior Member Array
    Join Date
    Jun 2015
    Location
    Home
    Karma
    3

    Default Switch case (sve osim...)

    Moze li mi neko pomoci da rijesim ovaj problem. Koristim Switch case komandu da uzmem oruzije od napadaca, pa sam to uradio na sljedeci nacin:

    Code:
    new Wpn = get_user_weapon(iKiller)
    
    switch(Wpn)
    {
         case CSW_HEGRENADE:
         case CSW_KNIFE:
         case // sve osim ova 2 predhodna
    }
    Kako da definisem 'case'
    Last edited by Croxeye; 30-09-2017 at 16:39.

  2. #2
    Moderator Array Megastorm's Avatar
    Join Date
    Sep 2011
    Location
    Tokyo, Japan
    Age
    22
    Karma
    33

    Default

    Koristis default.
    https://msdn.microsoft.com/en-us/lib...(v=vs.60).aspx
    Ista je prica kao i u C.

  3. #3
    Senior Member Array
    Join Date
    Jun 2015
    Location
    Home
    Karma
    3

    Default

    Hvala, mislio sam da je nesto na taj fazon samo sto sam ja pokusao sa 'case default:'

  4. #4
    Senior Member Array
    Join Date
    Jun 2015
    Location
    Home
    Karma
    3

    Default

    Zasto ne ocita CSW_HEGRENADE case ?

    Code:
                                    new Wpn = get_user_weapon(iKiller)
    
                                    switch(Wpn)
    				{
    					case CSW_HEGRENADE:
    					{
    						//HE
    					}
    					
    					default:
    					{
    						switch(Headshot)
    						{
    							case 0:
    							{
    								//HS
    							}
    							
    							case 1:
    							{
    								//KILL
    							}
    						}
    					}
    				}
    ako ubijem igraca bombom, pise da sam ga ubio puskom/obicnim killom.

  5. #5
    Senior Member Array
    Join Date
    Aug 2013
    Location
    Forbidden Forest
    Karma
    6

    Default

    Cini mi se da je zato sto kad pukne bomba ti u ruci drzis pusku.
    Pomoc oko plugina, TS3-a, discord-a mozete dobiti samo u vidu objasnjenja.
    P.S. Nemojte smarati/hejtovati obzirom da to niko ne voli a ja licno cu samo da vas kuliram.
    P.P.S. Nemojte pitati stvari na PM vec otvori temu.

  6. #6
    Senior Member Array
    Join Date
    Jun 2015
    Location
    Home
    Karma
    3

    Default

    Kako da provjerim da li je ubijen bombom ?

  7. #7
    Senior Member Array
    Join Date
    Aug 2013
    Location
    Forbidden Forest
    Karma
    6
    Pomoc oko plugina, TS3-a, discord-a mozete dobiti samo u vidu objasnjenja.
    P.S. Nemojte smarati/hejtovati obzirom da to niko ne voli a ja licno cu samo da vas kuliram.
    P.P.S. Nemojte pitati stvari na PM vec otvori temu.

  8. #8
    Senior Member Array
    Join Date
    Jun 2015
    Location
    Home
    Karma
    3

    Default

    vec sam pokusao sa client_death(), ali onda mi ne radi nista...

    poslije
    Code:
    switch(wpnindex)
    nista ne radi :/

  9. #9
    Senior Member Array
    Join Date
    Jun 2015
    Location
    Belgrade
    Karma
    6

    Default

    A da koristis deathmsg ?

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •