Will this work
#5

Код:
CMD:park(playerid, params[])
{
	if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_RED, "You must be in a vehicle to use this command!");
	if(playerVariables[playerid][pCarID] == GetPlayerVehicleID(playerid)) {

		if(playerVariables[playerid][pCarModel] >= 1 && doesVehicleExist(playerVariables[playerid][pCarID])) {
		
  			new
     			Float: vPos[4]; // x, y, z + z angle
     			
 		    GetVehiclePos(GetPlayerVehicleID(playerid), vPos[0], vPos[1], vPos[2]);
		    GetVehicleZAngle(GetPlayerVehicleID(playerid), vPos[3]);

      	  	    playerVariables[playerid][pCarPos][0] = vPos[0];
           	    playerVariables[playerid][pCarPos][1] = vPos[1];
           	    playerVariables[playerid][pCarPos][2] = vPos[2];
	       	    playerVariables[playerid][pCarPos][3] = vPos[3];

		    SendClientMessage(playerid, COLOR_GREY, "You have parked your vehicle");
		}
		else return SendClientMessage(playerid, COLOR_GREY, "You do not own a vehicle");
	}
	else return SendClientMessage(playerid, COLOR_GREY, "This is not your vehicle");
	return 1;
}
Ok i changed it up compiles fine, but are variables right.

Will it park the players car and not someone elses etc
Reply


Messages In This Thread
Will this work - by euRo - 23.06.2011, 17:37
Re: Will this work - by LZLo - 23.06.2011, 17:42
AW: Will this work - by Nero_3D - 23.06.2011, 17:42
Re: Will this work - by euRo - 23.06.2011, 18:09
Re: Will this work - by euRo - 23.06.2011, 19:05
Re: Will this work - by CrazyBlob - 23.06.2011, 20:04
Re: Will this work - by euRo - 23.06.2011, 20:47
Re: Will this work - by Elorreli - 23.06.2011, 20:51
Re: Will this work - by euRo - 23.06.2011, 23:12

Forum Jump:


Users browsing this thread: 1 Guest(s)