14.03.2016, 13:53
(
Последний раз редактировалось AlexBlack; 21.04.2016 в 10:53.
)
Hi, i have a small problem with this function :
The problem is that this function always return the first value, for example i have the valid VirtualServer value 1,2,3 and the string that i want to get is 3 but it will return 1, i have done some test commands and it's work perfect, this is my test commands below:
Thanks for reading.
PHP код:
stock CheckServerIp(string[]) {
foreach(new i: VirtualServer) if(!strcmp(VirtualServerInfo[i][sIP], string)) return i;
return -1;
}
PHP код:
CMD:getip(playerid, params[]) {
new value;
if(sscanf(params,"d", value)) return Usage(playerid, "/getip [id]");
return SendFormatMessage(playerid, -1, "%s", VirtualServerInfo[value][sIP]);
}