12.08.2016, 17:06
Quote:
Hello.
Try to upload your streamer include and plugin. Maybe this will be enough to remove the errors. |
Quote:
You using more params than should be
PHP код:
|
PHP код:
LoadDynamicMapIcons()
{
new arrCoords[7][64];
new strFromFile2[256];
new File: file = fopen("dynamicmapicons.cfg", io_read);
if (file)
{
new idx;
while (idx < sizeof(DMPInfo))
{
fread(file, strFromFile2);
splits(strFromFile2, arrCoords, '|');
DMPInfo[idx][dmpMarkerType] = strval(arrCoords[0]);
DMPInfo[idx][dmpColor] = strval(arrCoords[1]);
DMPInfo[idx][dmpVW] = strval(arrCoords[2]);
DMPInfo[idx][dmpInt] = strval(arrCoords[3]);
DMPInfo[idx][dmpPosX] = floatstr(arrCoords[4]);
DMPInfo[idx][dmpPosY] = floatstr(arrCoords[5]);
DMPInfo[idx][dmpPosZ] = floatstr(arrCoords[6]);
if(DMPInfo[idx][dmpMarkerType] != 0)
{
DMPInfo[idx][dmpMapIconID] = CreateDynamicMapIcon(DMPInfo[idx][dmpPosX], DMPInfo[idx][dmpPosY], DMPInfo[idx][dmpPosZ], DMPInfo[idx][dmpMarkerType], DMPInfo[idx][dmpColor], DMPInfo[idx][dmpVW], DMPInfo[idx][dmpInt], -1, 500.0);
}
idx++;
}
fclose(file);
}
return 1;
}
PHP код:
if(strcmp(choice, "position", true) == 0)
{
GetPlayerPos(playerid, DMPInfo[mapiconid][dmpPosX], DMPInfo[mapiconid][dmpPosY], DMPInfo[mapiconid][dmpPosZ]);
DMPInfo[mapiconid][dmpInt] = GetPlayerInterior(playerid);
DMPInfo[mapiconid][dmpVW] = GetPlayerVirtualWorld(playerid);
SendClientMessageEx(playerid, COLOR_WHITE, "You have changed the position!");
if(IsValidDynamicMapIcon(DMPInfo[mapiconid][dmpMapIconID])) DestroyDynamicMapIcon(DMPInfo[mapiconid][dmpMapIconID]);
DMPInfo[mapiconid][dmpMapIconID] = CreateDynamicMapIcon(DMPInfo[mapiconid][dmpPosX], DMPInfo[mapiconid][dmpPosY], DMPInfo[mapiconid][dmpPosZ], DMPInfo[mapiconid][dmpMarkerType], DMPInfo[mapiconid][dmpColor], DMPInfo[mapiconid][dmpVW], DMPInfo[mapiconid][dmpInt], -1, 500.0);
SaveDynamicMapIcons();
format(string, sizeof(string), "%s has edited MapIconID %d's Position.", GetPlayerNameEx(playerid), mapiconid);
Log("logs/dmpedit.log", string);
return 1;
}
else if(strcmp(choice, "delete", true) == 0)
{
SendClientMessageEx(playerid, COLOR_WHITE, "You have deleted the map icon!");
DMPInfo[mapiconid][dmpPosX] = 0.0;
DMPInfo[mapiconid][dmpPosY] = 0.0;
DMPInfo[mapiconid][dmpPosZ] = 0.0;
DMPInfo[mapiconid][dmpVW] = 0;
DMPInfo[mapiconid][dmpInt] = 0;
DMPInfo[mapiconid][dmpMarkerType] = 0;
DMPInfo[mapiconid][dmpColor] = 0;
SaveDynamicMapIcons();
if(IsValidDynamicMapIcon(DMPInfo[mapiconid][dmpMapIconID])) DestroyDynamicMapIcon(DMPInfo[mapiconid][dmpMapIconID]);
format(string, sizeof(string), "%s has deleted MapIconID %d.", GetPlayerNameEx(playerid), mapiconid);
Log("logs/dmpedit.log", string);
return 1;
}
else if(strcmp(choice, "markertype", true) == 0)
{
DMPInfo[mapiconid][dmpMarkerType] = amount;
format(string, sizeof(string), "You have set the marker type to %d.", amount);
SendClientMessageEx(playerid, COLOR_WHITE, string);
if(IsValidDynamicMapIcon(DMPInfo[mapiconid][dmpMapIconID])) DestroyDynamicMapIcon(DMPInfo[mapiconid][dmpMapIconID]);
DMPInfo[mapiconid][dmpMapIconID] = CreateDynamicMapIcon(DMPInfo[mapiconid][dmpPosX], DMPInfo[mapiconid][dmpPosY], DMPInfo[mapiconid][dmpPosZ], DMPInfo[mapiconid][dmpMarkerType], DMPInfo[mapiconid][dmpColor], DMPInfo[mapiconid][dmpVW], DMPInfo[mapiconid][dmpInt], -1, 500.0);
format(string, sizeof(string), "%s has edited MapIconID %d's Marker Type to %d.", GetPlayerNameEx(playerid), mapiconid, amount);
Log("logs/dmpedit.log", string);
}
else if(strcmp(choice, "color", true) == 0)
{
DMPInfo[mapiconid][dmpColor] = amount;
format(string, sizeof(string), "You have set the color to %d.", amount);
SendClientMessageEx(playerid, COLOR_WHITE, string);
if(IsValidDynamicMapIcon(DMPInfo[mapiconid][dmpMapIconID])) DestroyDynamicMapIcon(DMPInfo[mapiconid][dmpMapIconID]);
DMPInfo[mapiconid][dmpMapIconID] = CreateDynamicMapIcon(DMPInfo[mapiconid][dmpPosX], DMPInfo[mapiconid][dmpPosY], DMPInfo[mapiconid][dmpPosZ], DMPInfo[mapiconid][dmpMarkerType], DMPInfo[mapiconid][dmpColor], DMPInfo[mapiconid][dmpVW], DMPInfo[mapiconid][dmpInt], -1, 500.0);
format(string, sizeof(string), "%s has edited MapIconID %d's Color to %d.", GetPlayerNameEx(playerid), mapiconid, amount);
Log("logs/dmpedit.log", string);
}
SaveDynamicMapIcons();
return 1;
}