SA-MP Forums Archive
/findcar - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: /findcar (/showthread.php?tid=168142)



/findcar - CT_Ronnie_Deo - 15.08.2010

why doesn't this place a red marker at my car...

Код:
	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_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;
	}



Re: /findcar - CT_Ronnie_Deo - 15.08.2010

nvm fixed it..