Minimap Mapicons
#2

Try this :

Quote:

CMD:createmapicon(playerid, params[])
{
new string[128], type;
if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
if(PlayerInfo[playerid][pAdmin] < 4) return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
// if(!aDuty[playerid]) return SendClientMessage(playerid, COLOR_GREY, "You are not on admin duty.");
if(sscanf(params, "i", type)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /createmapicon [icon]");
if(type == 0 || type == 1) return SendClientMessage(playerid, COLOR_GREY, "Invalid mapicon type.");
for(new idx=0; idx<MAX_MAPICONS; idx++)
{
if(!MapIconInfo[idx][mpType])
{
MapIconInfo[idx][mpType] = type;
GetPlayerPos(playerid, MapIconInfo[idx][mpX], MapIconInfo[idx][mpY], MapIconInfo[idx][mpZ]);
MapIconInfo[idx][mpID] = CreateDynamicMapIcon(MapIconInfo[idx][mpX], MapIconInfo[idx][mpY], MapIconInfo[idx][mpZ], MapIconInfo[idx][mpType], 100);
format(string, sizeof(string), "{FF0000}[Admin Warn]{FF6347} %s has created mapicon ID %d.", RPN(playerid), idx);
SendAdminMessage(COLOR_DARKRED, 1, string);
Log("logs/mapicons.log", string);
idx = MAX_DOORS;
}
}
return 1;
}

Reply


Messages In This Thread
Minimap Mapicons - by LMagnifico - 18.12.2013, 08:47
Re: Minimap Mapicons - by WhiteAngels - 18.12.2013, 09:19
Re: Minimap Mapicons - by WhiteAngels - 18.12.2013, 09:24
Re : Minimap Mapicons - by [HRD]Mar1 - 18.12.2013, 09:24
Re: Minimap Mapicons - by LMagnifico - 18.12.2013, 10:15
Re : Minimap Mapicons - by [HRD]Mar1 - 18.12.2013, 11:30
Re: Minimap Mapicons - by LMagnifico - 19.12.2013, 07:14
Re: Minimap Mapicons - by WhiteAngels - 20.12.2013, 06:26
Re: Minimap Mapicons - by LMagnifico - 20.12.2013, 09:24

Forum Jump:


Users browsing this thread: 2 Guest(s)