 |
|
Senior Member
Join Date: Sep 2011
Location: Lithuania
|

09-29-2011
, 13:58
Re: How to make code shorter?
|
#6
|
Quote:
Originally Posted by jimaway
PHP Code:
public Showrod(id) { set_task(10.0, "CancelMenu", id); show_menu(id, Keysrod, "Choose VIP guns:^n\w1. Get M4A1 and Deagle ^n\w2. Get AK47 and Deagle ^n3. Get Galil and Deagle ^n0. Exit^n", -1, "rod") // Display menu new mapname[11]; get_mapname(mapname, charsmax(mapname)); if (containi("awp_india awp_dust cs_deagle5", mapname) > -1) { client_cmd(id, "slot10"); } }
dont use this when you have maps like "cs_deagle" or "awp_indi" or something else that might get found in "awp_india awp_dust cs_deagle5" string
|
Why > -1?
Last edited by Evaldas.Grigas; 09-29-2011 at 14:09.
|
|
|
|