03.11.2010, 03:55
ok, i have this problem with my /findcar cmd, it places the marker(ID 41) (https://sampwiki.blast.hk/wiki/MapIcons) but when ever you mark somewhere else on the map it will hide your car again this can be quite annoying, id like to make this icon a red square on the mini-map and on the big map, and if possable make it so that when you walk into the marker it removes the marker rather than having to type /foundcar, thanks a heap
Код:
if(strcmp(cmd, "/findcar", true) == 0) // By CuervO_NegrO
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pPcarkey] == 999)
{
SendClientMessage(playerid, COLOR_GREY, "You don't have a car");
return 1;
}
new carid = PlayerInfo[playerid][pPcarkey];
new Float:X, Float:Y, Float:Z;
new zone[MAX_ZONE_NAME];
GetVehicle2DZone(carid, zone, MAX_ZONE_NAME);
GetVehiclePos(carid, X,Y,Z);
if(Searching[playerid] == 0)
{
Searching[playerid] = 1;
SetPlayerMapIcon(playerid, 500 + playerid, X,Y,Z, 41, COLOR_RED);
format(string, sizeof(string),"Your car is at %s, red marker has been set at the map. Type /foundit when you have found it.",zone);
SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
}
else
{
RemovePlayerMapIcon(playerid, carid+1);
SetPlayerMapIcon(playerid, 500 + playerid, X,Y,Z, 41, COLOR_YELLOW);
format(string, sizeof(string),"Your car is at %s, red marker has been set at the map. Type /foundit when you have found it.",zone);
SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
}
}
return 1;
}


