05.05.2012, 18:48
pawn Код:
IsPlayerInPlane(playerid)
{
switch(GetVehicleModel(GetPlayerVehicleID(playerid)))
{
case 592, 577, 511, 512, 593, 520, 553, 476, 519, 460, 513, 548, 425, 417, 487, 488, 497, 563, 447, 469: return 1;
}
return 0;
}
public OnGameModeInit()
{
MapAndreas_Init(1);
return 1;
}
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(newkeys & KEY_FIRE)
{
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
if(IsPlayerInPlane(playerid))
{
new Float: playersPos[3];
GetPlayerPos(playerid, playersPos[0], playersPos[1], playersPos[2]);
MapAndreas_FindZ_For2DCoord(playersPos[0], playersPos[1], playersPos[2]);
CreateExplosion(playersPos[0], playersPos[1], playersPos[2], 6, 10.0);
}
}
}
return 1;
}