04.03.2015, 17:09
Hello,I need a /v command which spawns a nrg and after the player exits the nrg it gets destroyed +rep for the one who can provide me with this command.
Best regards,
Best regards,
#include <a_samp>
#include <zcmd>
new PlayerVehicle[MAX_PLAYERS];
CMD:v(playerid, params[])
{
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
PlayerVehicle[playerid] = CreateVehicle(522, x, y, z, 0, 0, 0, -1);
return 1;
}
public OnPlayerConnect(playerid)
{
PlayerVehicle[playerid] = -1;
return 1;
}
public OnPlayerExitVehicle(playerid)
{
DestroyVehicle(PlayerVehicle[playerid]);
return 1;
}
public OnPlayerExitVehicle(playerid) { DestroyVehicle(PlayerVehicle[playerid]); return 1; }
PlayerVehicle[playerid] = CreateVehicle DestroyVehicle(PlayerVehicle[playerid]) |
CreateVehicle(522, x, y, z
CreateVehicle(522, x + 3, y, z