AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   A switch item (https://forums.alliedmods.net/showthread.php?t=339172)

QuickDroLLL 08-20-2022 17:30

A switch item
 
hello every one quickdrolll here, so i loking for help with item switch like
Skin:[SKin1][skin2][skin2]
so every time you presed the item it switch to another item in one item
i hope you understand me if you don't i will explain more

fysiks 08-20-2022 18:09

Re: A switch item
 
Simply use a counter to keep track of which one you're currently on.

PHP Code:

szItems[][] = {"Item1""Item2""Item3"}

// Call this when you want to change the item
iItemIndex = ++iItemIndex sizeof szItems

// To get the current item string use this
szItems[iItemIndex


Natsheh 08-21-2022 04:48

Re: A switch item
 
szItems[] = {"Item1", "Item2", "Item3"}

:arrow:

szItems[][] = {"Item1", "Item2", "Item3"}

fysiks 08-21-2022 15:09

Re: A switch item
 
Fixed.

QuickDroLLL 08-22-2022 08:39

Re: A switch item
 
thank you guys


All times are GMT -4. The time now is 15:38.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.