CMD:boost(playerid,parmas[])
{
if(IsPlayerAdmin(playerid))
{
if(SpeedBoost[playerid]==0)
{
new vehicleid = GetPlayerVehicleID(playerid);
new seat=GetPlayerState(playerid);
if(newkeys & SBKey) // SpeedBoost
{
if(seat!=PLAYER_STATE_PASSENGER)
{
new Float:vehx; new Float:vehy; new Float:vehz;
GetVehicleVelocity(vehicleid,vehx,vehy,vehz);
SetVehicleVelocity(vehicleid,vehx*SpeedBoost,vehy*SpeedBoost,vehz*SpeedBoost);
}
}
if(PRESSED(KEY_SUBMISSION))
{
if(seat!=PLAYER_STATE_PASSENGER)
{
new Float:x, Float:y, Float:z;
new vehicle = GetPlayerVehicleID(playerid);
new VehicleID, Float:X, Float:Y, Float:Z, Float:Angle;
if(IsPlayerInVehicle(playerid, vehicleid))
{
VehicleID = GetPlayerVehicleID(playerid);
GetVehicleZAngle(VehicleID, Angle);
GetVehiclePos(VehicleID,X,Y,Z);
SetVehiclePos(VehicleID, X, Y, Z);
SetVehicleZAngle(VehicleID, Angle);
GetVehicleVelocity(vehicle,x,y,z);
SetVehicleVelocity(vehicle,x,y,z+0.2);
RepairVehicle(GetPlayerVehicleID(playerid));
}
}
}
else
{
new vehicleid = GetPlayerVehicleID(playerid);
new seat=GetPlayerState(playerid);
if(newkeys & SBKey) // SpeedBoost
{
if(seat!=PLAYER_STATE_PASSENGER)
{
new Float:vehx; new Float:vehy; new Float:vehz;
GetVehicleVelocity(vehicleid,vehx,vehy,vehz);
SetVehicleVelocity(vehicleid,vehx,vehy,vehz);
}
}
if(PRESSED(KEY_SUBMISSION))
{
if(seat!=PLAYER_STATE_PASSENGER)
{
new Float:x, Float:y, Float:z;
new vehicle = GetPlayerVehicleID(playerid);
new VehicleID, Float:X, Float:Y, Float:Z, Float:Angle;
if(IsPlayerInVehicle(playerid, vehicleid))
{
VehicleID = GetPlayerVehicleID(playerid);
GetVehicleZAngle(VehicleID, Angle);
GetVehiclePos(VehicleID,X,Y,Z);
SetVehiclePos(VehicleID, X, Y, Z);
SetVehicleZAngle(VehicleID, Angle);
GetVehicleVelocity(vehicle,x,y,z);
SetVehicleVelocity(vehicle,x,y,z);
RepairVehicle(GetPlayerVehicleID(playerid));
}
}
}
else return SendClientMessage(playerid,COLOR_RED,"ERROR:You are not at high enough level to use this command.");
return 1
}
E:\ALL SETUPS\SAMP NEEDs\samp03e_svr_R2_win32\gamemodes\ImpulsiveX.pwn(1331) : error 017: undefined symbol "LoopingAnim"
E:\ALL SETUPS\SAMP NEEDs\samp03e_svr_R2_win32\gamemodes\ImpulsiveX.pwn(1817) : error 029: invalid expression, assumed zero
E:\ALL SETUPS\SAMP NEEDs\samp03e_svr_R2_win32\gamemodes\ImpulsiveX.pwn(1817) : error 029: invalid expression, assumed zero
E:\ALL SETUPS\SAMP NEEDs\samp03e_svr_R2_win32\gamemodes\ImpulsiveX.pwn(1817) : warning 215: expression has no effect
E:\ALL SETUPS\SAMP NEEDs\samp03e_svr_R2_win32\gamemodes\ImpulsiveX.pwn(1817) : error 001: expected token: ";", but found "]"
E:\ALL SETUPS\SAMP NEEDs\samp03e_svr_R2_win32\gamemodes\ImpulsiveX.pwn(1817) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
5 Errors.
public OnPlayerUpdate(playerid)
{
new Text3D:text; // variables
new vehicleid = GetPlayerVehicleID(playerid);
if(IsPlayerInAnyVehicle(playerid))
{
if(Boost[playerid] == 1)
{
text = Create3DTextLabel( "{00FF00}Boost:Online", 0xFF0000AA, 0.0, 0.0,0.0, 50.0, 0, 1 ); // Create3D
Attach3DTextLabelToVehicle( text, vehicleid, 0.0, 0.0, 0.7);// Attach3D
Update3DTextLabelText(text, 0xFFFFFFFF, "{00FF00}Boost:Online");
}
else
{
text = Create3DTextLabel( "{00FF00}Boost:{FF0000}Offline", 0xFF0000AA, 0.0, 0.0,0.0, 50.0, 0, 1 ); // Create3D
Attach3DTextLabelToVehicle( text, vehicleid, 0.0, 0.0, 0.7);// Attach3D
Update3DTextLabelText(text, 0xFFFFFFFF, "{00FF00}Boost:{FF0000}Offline");
}
}
else
{
DeletePlayer3DTextLabel(playerid,text); ///This is line no. 1900
}
return 1;
}
E:\ALL SETUPS\SAMP NEEDs\samp03e_svr_R2_win32\gamemodes\ImpulsiveX.pwn(1900) : warning 213: tag mismatch
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
1 Warning.
public OnPlayerUpdate(playerid)
{
new Text3D:text; // variables
new vehicleid = GetPlayerVehicleID(playerid);
if(IsPlayerInAnyVehicle(playerid))
{
if(Boost[playerid] == 1)
{
text = Create3DTextLabel( "{00FF00}Boost:Online", 0xFF0000AA, 0.0, 0.0,0.0, 50.0, 0, 1 ); // Create3D
Attach3DTextLabelToVehicle( text, vehicleid, 0.0, 0.0, 0.7);// Attach3D
Update3DTextLabelText(text, 0xFFFFFFFF, "{00FF00}Boost:Online");
}
else
{
text = Create3DTextLabel( "{00FF00}Boost:{FF0000}Offline", 0xFF0000AA, 0.0, 0.0,0.0, 50.0, 0, 1 ); // Create3D
Attach3DTextLabelToVehicle( text, vehicleid, 0.0, 0.0, 0.7);// Attach3D
Update3DTextLabelText(text, 0xFFFFFFFF, "{00FF00}Boost:{FF0000}Offline");
}
}
else
{
DeletePlayer3DTextLabel(playerid,Text3D:text);
}
return 1;
}
public OnPlayerUpdate(playerid)
{
new Text3D:text; // variables
new vehicleid = GetPlayerVehicleID(playerid);
if(IsPlayerInAnyVehicle(playerid))
{
if(Boost[playerid] == 1)
{
text = Create3DTextLabel( "{00FF00}Boost:Online", 0xFF0000AA, 0.0, 0.0,0.0, 50.0, 0, 1 ); // Create3D
Attach3DTextLabelToVehicle( text, vehicleid, 0.0, 0.0, 0.7);// Attach3D
Update3DTextLabelText(text, 0xFFFFFFFF, "{00FF00}Boost:Online");
}
else
{
text = Create3DTextLabel( "{00FF00}Boost:{FF0000}Offline", 0xFF0000AA, 0.0, 0.0,0.0, 50.0, 0, 1 ); // Create3D
Attach3DTextLabelToVehicle( text, vehicleid, 0.0, 0.0, 0.7);// Attach3D
Update3DTextLabelText(text, 0xFFFFFFFF, "{00FF00}Boost:{FF0000}Offline");
}
}
else
{
DeletePlayer3DTextLabel(playerid,text); ///This is line no. 1900
}
return 1;
}
Try this:
pawn Код:
|
public OnPlayerUpdate(playerid)
{
new Text3D:text; // variables
new vehicleid = GetPlayerVehicleID(playerid);
if(IsPlayerInAnyVehicle(playerid))
{
if(Boost[playerid] == 1)
{
text = Create3DTextLabel( "{00FF00}Boost:Online", 0xFF0000AA, 0.0, 0.0,0.0, 50.0, 0, 1 ); // Create3D
Attach3DTextLabelToVehicle( text, vehicleid, 0.0, 0.0, 0.7);// Attach3D
Update3DTextLabelText(text, 0xFFFFFFFF, "{00FF00}Boost:Online");
}
else
{
text = Create3DTextLabel( "{00FF00}Boost:{FF0000}Offline", 0xFF0000AA, 0.0, 0.0,0.0, 50.0, 0, 1 ); // Create3D
Attach3DTextLabelToVehicle( text, vehicleid, 0.0, 0.0, 0.7);// Attach3D
Update3DTextLabelText(text, 0xFFFFFFFF, "{00FF00}Boost:{FF0000}Offline");
}
}
else
{
Delete3DTextLabel(text); //here
}
return 1;
}