31.05.2016, 17:14
//Edit:
Oh god...now i see what you wanna do...
Just make it like this:
Oh god...now i see what you wanna do...
Just make it like this:
PHP код:
COMMAND:checkbiztype(playerid, params[])
{
new index,string[128]; //Use this..you should avoid global strings...
if( sscanf ( params, "d", index)) return SCP(playerid, "[BizID]");
if(index < 0 || index >= sizeof(BusinessInfo)) return SCP(playerid,"Index out of Bounds!");
format(string, sizeof(string), "String: %s || Int: %d", getBizName(BusinessInfo[index][bType]), BusinessInfo[index][bType]);
SendClientMessage(playerid, COLOR_WHITE, string);
return 1;
}
stock getBizName(index)
{
new name[50];
switch(index)
{
case BUSINESS_TYPE_BANK: name="Bank";
case BUSINESS_TYPE_247: name="Grocery Store";
}
return name;
}