15.04.2013, 07:39
I already posted a topic about it, but so lazy to search the post :S
so here's my problem i cant get my admin car destroyed! i dont get any error neither bug.. but its not working,
if i go off duty the vehicle is not destroyed!!
thanks in advance!
so here's my problem i cant get my admin car destroyed! i dont get any error neither bug.. but its not working,
if i go off duty the vehicle is not destroyed!!
pawn Код:
CMD:acar(playerid, params[])
{
if(aDuty[playerid] == 1)
if(PlayerInfo[playerid][pAdmin] >= 1)
{
if(LastAdminVehicle[playerid] != 0) DestroyVehicle(LastAdminVehicle[playerid]);
if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, C_RED, "You are already in a vehicle!");
new Float:XYZ[3], Float:Angle;
GetPlayerPos(playerid, XYZ[0], XYZ[1], XYZ[2]);
GetPlayerFacingAngle(playerid, Angle);
new car = CreateVehicle(596, XYZ[0]+1.0, XYZ[1]+1.0, XYZ[2], Angle, 232, 232, -1);
PutPlayerInVehicle(playerid, car, 0);
LastAdminVehicle[playerid] = GetPlayerVehicleID(playerid);
}
else
{
aDuty[playerid] = 0;
DestroyVehicle(LastAdminVehicle[playerid]);
SendClientMessage(playerid, C_RED, "You can't use the admin car, when off-duty!!");
}
return 1;
}