DMP's
#1

I simply try to make a DMP Markertype with any ID. (via; 54 Gym Icon) All it does is repeat to ID 20 or 21. Here is the command and here is the result I get.

Quote:

CMD:dmpedit(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] < 4)
{
SendClientMessageEx(playerid, COLOR_GRAD2, "You are not authorized to use that command!");
return 1;
}

new string[128], choice[32], mapiconid, amount;
if(sscanf(params, "s[32]dD", choice, mapiconid, amount))
{
SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /dmpedit [name] [mapiconid] [(Optional)amount]");
SendClientMessageEx(playerid, COLOR_GREY, "Available names: Position, MarkerType, Color, Delete");
return 1;
}

if(mapiconid < 0 || mapiconid >= MAX_DMAPICONS)
{
SendClientMessageEx( playerid, COLOR_WHITE, "Invalid Map Icon ID!");
}

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;
}

Reply


Messages In This Thread
DMP's - by Ryan McDuff - 01.02.2014, 04:46
Re: DMP's - by ACI - 01.02.2014, 04:55
Re: DMP's - by Ryan McDuff - 01.02.2014, 05:01
Re: DMP's - by ACI - 01.02.2014, 05:33
Re: DMP's - by Scaleta - 01.02.2014, 06:02
Re: DMP's - by CuervO - 01.02.2014, 06:04
Re: DMP's - by Ryan McDuff - 01.02.2014, 08:03

Forum Jump:


Users browsing this thread: 3 Guest(s)