help - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: help (
/showthread.php?tid=326761)
help -
STONEGOLD - 18.03.2012
C:\DOCUME~1\BALOCH\MYDOCU~1\DOWNLO~1\repair.pwn(31 ) : warning 217: loose indentation
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
1 Warning.
Код:
#define FILTERSCRIPT
#define COLOR_LIGHTBLUE 0x0080FFFF
#define PRESSED(%0) \
(((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))
#define IsPlayerNotInVehicle(%0) (!IsPlayerInAnyVehicle(%0))
#include <a_samp>
#if defined FILTERSCRIPT
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" Car Fix by pressing 2 to fix your car.");
print("--------------------------------------\n");
return 1;
}
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(PRESSED(KEY_SUBMISSION))
{
new vehicleid = GetPlayerVehicleID(playerid);
if(IsPlayerInVehicle(playerid, vehicleid))
{
SetVehicleHealth(vehicleid,1000.0);
RepairVehicle(GetPlayerVehicleID(playerid));
PlayerPlaySound(playerid, 1133, 0.0, 0.0, 0.0);
SendClientMessage(playerid,COLOR_LIGHTBLUE,"You have successfully repaired your car!");
}
}
if(PRESSED(KEY_ACTION))
{
if(IsPlayerNotInVehicle(playerid))
{
SendClientMessage(playerid,COLOR_LIGHTBLUE,"You have to be in a car to be able to repair your car!");
}
}
}
#endif
Re: help -
Ronaldo_raul™ - 18.03.2012
pawn Код:
#define FILTERSCRIPT
#define COLOR_LIGHTBLUE 0x0080FFFF
#define PRESSED(%0) \
(((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))
#define IsPlayerNotInVehicle(%0) (!IsPlayerInAnyVehicle(%0))
#include <a_samp>
#if defined FILTERSCRIPT
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" Car Fix by pressing 2 to fix your car.");
print("--------------------------------------\n");
return 1;
}
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(PRESSED(KEY_SUBMISSION))
{
new vehicleid = GetPlayerVehicleID(playerid);
if(IsPlayerInVehicle(playerid, vehicleid))
{
SetVehicleHealth(vehicleid,1000.0);
RepairVehicle(GetPlayerVehicleID(playerid));
PlayerPlaySound(playerid, 1133, 0.0, 0.0, 0.0);
SendClientMessage(playerid,COLOR_LIGHTBLUE,"You have successfully repaired your car!");
}
}
if(PRESSED(KEY_ACTION))
{
if(IsPlayerNotInVehicle(playerid))
{
SendClientMessage(playerid,COLOR_LIGHTBLUE,"You have to be in a car to be able to repair your car!");
}
}
}
#endif
Easy enough.
Re: help -
Alexy_Dramon - 18.03.2012
Код:
PlayerPlaySound(playerid, 1133, 0.0, 0.0, 0.0);
it's your problem
i think check it
move it's little back and it's will ain't show this warnning again
Re: help -
rati555 - 18.03.2012
or use this