31.12.2014, 00:43
Hi. I have a problem with a zone, I would like to save postions on the server and save them to a dynamic array to use them as a function of CreateDynamicPolygon.
This code creates a zone but that's zone does not work. I think that the positions of the array are read by the wrong features. How can I do to make it work? Help me ...
Код:
cmd(sel4, playerid, params[]) { new str2[256], iss; format(str2, sizeof(str2), "%f, %f %f, %f %f, %f %f, %f", PlayerInfo[playerid][pSelPos][0], PlayerInfo[playerid][pSelPos][1], PlayerInfo[playerid][pSelPos][2], PlayerInfo[playerid][pSelPos][3], PlayerInfo[playerid][pSelPos][4], PlayerInfo[playerid][pSelPos][5], PlayerInfo[playerid][pSelPos][6], PlayerInfo[playerid][pSelPos][7]); PlayerInfo[playerid][pSelSrng] = str2; printf("%s", PlayerInfo[playerid][pSelSrng]); iss = CreateDynamicPolygon(PlayerInfo[playerid][pSelSrng], -100.0, 100.0); new ipls = Streamer_CountItems(STREAMER_TYPE_AREA), ipl = GetDynamicPolygonPoints(iss, str2, sizeof(str2)); //mysql_free_result(); printf("areas - %d, %d points", ipls, ipl); return 1; }