Jump to content
  • 0

/findcar


ToX1c

Question

Salut cum as putea face si eu la comanda /findcar daca este un checkpoint pe mapa sa nu pot sa dau

Am incercat eu sa fac da nu merge

http://tinypic.com/view.php?pic=1597jp&s=8#.U1k571V_tCI

CMD:findcar(playerid, params[])
{
if(sweep[playerid] == 1)
{
SendClientMessage(playerid, COLOR_GREY, SYNTAX_MESSAGE" Nu poti folosi acum aceasta comanda");
return 1;
}
   new carslot;
	if(sscanf(params, "d", carslot)) return SendClientMessage(playerid, COLOR_GREY, SYNTAX_MESSAGE"/findcar [1/2/3/4]");
	{
	if(CP[playerid] == 0)
	{
		if(playerVariables[playerid][pCarModel1] >= 1 || playerVariables[playerid][pCarModel2] >= 1 || playerVariables[playerid][pCarModel3] >= 1 || playerVariables[playerid][pCarModel4] >= 1)
		{
		    if(carslot == 1)
		    {
				GetVehiclePos(playerVariables[playerid][pCarID1], playerVariables[playerid][pCarPos1][0], playerVariables[playerid][pCarPos1][1], playerVariables[playerid][pCarPos1][2]);
				SetPlayerCheckpoint(playerid, playerVariables[playerid][pCarPos1][0], playerVariables[playerid][pCarPos1][1], playerVariables[playerid][pCarPos1][2], 10.0);
				playerVariables[playerid][pCheckpoint] = 4;
				format(szMessage, sizeof(szMessage), "A checkpoint has been set to your %s.", VehicleNames[playerVariables[playerid][pCarModel1] - 400]);
				SendClientMessage(playerid, COLOR_WHITE, szMessage);
			}
			else if(carslot == 2)
			{
			    GetVehiclePos(playerVariables[playerid][pCarID2], playerVariables[playerid][pCarPos2][0], playerVariables[playerid][pCarPos2][1], playerVariables[playerid][pCarPos2][2]);
				SetPlayerCheckpoint(playerid, playerVariables[playerid][pCarPos2][0], playerVariables[playerid][pCarPos2][1], playerVariables[playerid][pCarPos2][2], 10.0);
				playerVariables[playerid][pCheckpoint] = 4;
				format(szMessage, sizeof(szMessage), "A checkpoint has been set to your %s.", VehicleNames[playerVariables[playerid][pCarModel2] - 400]);
				SendClientMessage(playerid, COLOR_WHITE, szMessage);
			}
			else if(carslot == 3)
			{
			    GetVehiclePos(playerVariables[playerid][pCarID3], playerVariables[playerid][pCarPos3][0], playerVariables[playerid][pCarPos3][1], playerVariables[playerid][pCarPos3][2]);
				SetPlayerCheckpoint(playerid, playerVariables[playerid][pCarPos3][0], playerVariables[playerid][pCarPos3][1], playerVariables[playerid][pCarPos3][2], 10.0);
				playerVariables[playerid][pCheckpoint] = 4;
				format(szMessage, sizeof(szMessage), "A checkpoint has been set to your %s.", VehicleNames[playerVariables[playerid][pCarModel3] - 400]);
				SendClientMessage(playerid, COLOR_WHITE, szMessage);
			}
			else if(carslot == 4)
			{
			    GetVehiclePos(playerVariables[playerid][pCarID4], playerVariables[playerid][pCarPos4][0], playerVariables[playerid][pCarPos4][1], playerVariables[playerid][pCarPos4][2]);
				SetPlayerCheckpoint(playerid, playerVariables[playerid][pCarPos4][0], playerVariables[playerid][pCarPos4][1], playerVariables[playerid][pCarPos4][2], 10.0);
				playerVariables[playerid][pCheckpoint] = 4;
				format(szMessage, sizeof(szMessage), "A checkpoint has been set to your %s.", VehicleNames[playerVariables[playerid][pCarModel4] - 400]);
				SendClientMessage(playerid, COLOR_WHITE, szMessage);
           }
			}
			else SendClientMessage(playerid, COLOR_GREY, "Invalid car slot id.");
		}
		else SendClientMessage(playerid, COLOR_GREY, "You don't own a vehicle.");
	}
	SendClientMessage(playerid, COLOR_GREY, "Foloseste /killcp pentru a folosi comanda !");
	return 1;
}

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • 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.