11.12.2009, 06:59
Код:
//=============================================================// #include <a_samp> #pragma tabsize 0 #define RC_TANK 564 new Float:X, Float:Y, Float:Z; #define PRESSED(%0) \ (((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0))) public OnPlayerKeyStateChange(playerid, newkeys, oldkeys) { new vehicleID = GetPlayerVehicleID(playerid); if(IsVehicleRc(vehicleID) || GetVehicleModel(vehicleID) == RC_TANK){ if(GetVehicleModel(vehicleID) != RC_TANK){ if (PRESSED(KEY_FIRE)) { GetXYInFrontOfPlayer(playerid,X,Y,5); CreateExplosion(X, Y, Z, 12, 5); } } } return 1; } IsVehicleRc( vehicleid ){ new model = GetVehicleModel(vehicleid); switch(model){ case RC_TANK: return 1; default: return 0; } return 0; } //==========================================================//
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
1 Error.