04.11.2014, 22:37
(
Последний раз редактировалось Abagail; 25.04.2015 в 22:33.
)
Replace IsPlayerAdmin to use your admin variable/system.
Or of-course you could've simply searched. Anyway, basically you need to get the player's pos, and then set the vehicle's coordinates accordingly.
pawn Код:
CMD:getcar(playerid, params[])
{
if(IsPlayerAdmin(playerid))
{
if(sscanf(params, "d", vehicleid)) return SendClientMessage(playerid, -1, "USAGE: /getcar [car]");
if(IsValidVehicle(vehicleid))
{
new Float: pos[3];
GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
SetVehiclePos(playerid, pos[0], pos[1], pos[2]);
SetPlayerPos(playerid, pos[0], pos[1]+3.0, pos[2]);
return 1;
}
else return SendClientMessage(playerid, -1, "That vehicle isn't valid.");
}
else return SendClientMessage(playerid, -1, "Your not an admin!");
}