Jump to content
  • 0

Question

4 answers to this question

Recommended Posts

Posted
if(strcmp(cmd, "/findcar", true) == 0)
{
 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_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);
  }
  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;
}

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.