Printing out something from an enum
#6

//Edit:
Oh god...now i see what you wanna do...
Just make it like this:

PHP код:
COMMAND:checkbiztype(playeridparams[]) 
{
    new 
index,string[128]; //Use this..you should avoid global strings...
    
if( sscanf params"d"index)) return SCP(playerid"[BizID]"); 
    if(
index || index >= sizeof(BusinessInfo)) return SCP(playerid,"Index out of Bounds!"); 
    
format(stringsizeof(string), "String: %s || Int: %d"getBizName(BusinessInfo[index][bType]),  BusinessInfo[index][bType]); 
    
SendClientMessage(playeridCOLOR_WHITEstring); 
    return 
1
}
stock getBizName(index)
{
    new 
name[50];
    switch(
index)
    {
        case 
BUSINESS_TYPE_BANKname="Bank";
        case 
BUSINESS_TYPE_247name="Grocery Store";
    }
    return 
name;

Reply


Messages In This Thread
Printing out something from an enum - by Amit1998 - 30.05.2016, 21:13
Re: Printing out something from an enum - by Amit1998 - 31.05.2016, 15:09
Re: Printing out something from an enum - by Dayrion - 31.05.2016, 15:57
Re: Printing out something from an enum - by Kaliber - 31.05.2016, 15:58
Re: Printing out something from an enum - by Amit1998 - 31.05.2016, 17:07
Re: Printing out something from an enum - by Kaliber - 31.05.2016, 17:14
Re: Printing out something from an enum - by Amit1998 - 31.05.2016, 17:41
Re: Printing out something from an enum - by Konstantinos - 31.05.2016, 18:28
Re: Printing out something from an enum - by Amit1998 - 31.05.2016, 18:57
Re: Printing out something from an enum - by Konstantinos - 31.05.2016, 19:15

Forum Jump:


Users browsing this thread: 1 Guest(s)