19.05.2017, 15:54
Hi!
How can I optimize this function with a loop ?
thanks
How can I optimize this function with a loop ?
thanks
Код HTML:
Function(playerid) { if(PlayerInfo[playerid][house1] == 40) { PlayerInfo[playerid][house1] = 0; } else if(PlayerInfo[playerid][house2] == 40){ PlayerInfo[playerid][house2] = 0; } else if(PlayerInfo[playerid][house3] == 40){ PlayerInfo[playerid][house3] = 0; } else if(PlayerInfo[playerid][house4] == 40){ PlayerInfo[playerid][house4] = 0; } else if(PlayerInfo[playerid][house5] == 40){ PlayerInfo[playerid][house5] = 0; } else if(PlayerInfo[playerid][house6] == 40){ PlayerInfo[playerid][house6] = 0; } else if(PlayerInfo[playerid][house7] == 40){ PlayerInfo[playerid][house7] = 0; } else if(PlayerInfo[playerid][house8] == 40){ PlayerInfo[playerid][house8] = 0; } return 1; }