01.06.2012, 14:31
Quote:
The problem is not in this command, I think somewhere in OnPlayerCommandText before this command.
|
pawn Код:
if(!strcmp(cmd,"/flip",true) || !strcmp(cmd,"/flipcar",true))
{
if(dini_Int(pFile(playerid),"HaveCar") == 0 && !IsPlayerAdmin(playerid))return SendClientMessage(playerid,red,"You dont have vehicle");
if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,red,"You dont drive on car");
if(vehicleid != CarID(playerid) && !IsPlayerAdmin(playerid)) return SendClientMessage(playerid,red,"This is not your car");
if(dini_Int(vFile(vehicleid),"sCar") == 0 && !IsPlayerAdmin(playerid)) return SendClientMessage(playerid,red,"For only special cars");
GetVehiclePos(GetPlayerVehicleID(playerid),X,Y,Z);
GetVehicleZAngle(GetPlayerVehicleID(playerid),Angle);
SetVehiclePos(GetPlayerVehicleID(playerid),X,Y,Z+3);
SetVehicleZAngle(GetPlayerVehicleID(playerid),Angle);
PlayerPlaySound(playerid,1058,0.0,0.0,0.0);
return SendClientMessage(playerid,yellow,"You fliped this car!");
}