03.10.2010, 18:00
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(newkeys & KEY_FIRE)
{
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
for(new i = 0; i < MAX_VEHICLES; i++)
{
if(IsAttached[i] == true)
{
if(GetPlayerVehicleID(playerid) == i)
{
new i2 = GetPlayerVehicleID(playerid);
CreateExplosion(VehCameraPos[i2][0]+(VehVectorPos[i2][0] * Dist),VehCameraPos[i2][1]+(VehVectorPos[i2][1] * Dist),VehCameraPos[i2][2]+(VehVectorPos[i2][2] * Dist),7,100);
if(newkeys & KEY_SUBMISSION)
{
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
new Float:plocx,Float:plocy,Float:plocz,Float:ploca;
GetPlayerPos(playerid, plocx, plocy, plocz);
GetPlayerFacingAngle(playerid,ploca);
CreateStrip(plocx,plocy,plocz,ploca);
}
}
}
}
}
}
}
return 1;
}
pawn Код:
if(newkeys & KEY_SUBMISSION)
{
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
new Float:plocx,Float:plocy,Float:plocz,Float:ploca;
GetPlayerPos(playerid, plocx, plocy, plocz);
GetPlayerFacingAngle(playerid,ploca);
CreateStrip(plocx,plocy,plocz,ploca);