Jump to content
  • 0

/engine si /fill


gabbii

Question

cum pot face cand scri/fill sa nu bage benzina cand motoru e pornit?

/engine si /stopengine

}    
if(strcmp(cmd, "/engine",true) == 0) {
        new vid = GetPlayerVehicleID(playerid);
        if(vid != INVALID_VEHICLE_ID) {
            if(IsABBike(vid)) return SendClientMessage(playerid, COLOR_GRAD2, "This bike doesen't have engine!");
            GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
//                                 ||||||
            SetVehicleParamsEx(vid,VEHICLE_PARAMS_ON,lights,alarm,doors,bonnet,boot,objective);
//VEHICLE_PARAMS_ON is used to start the engine,it purely replace the engine thing!
        }
        return 1;
[code]    }
    if(strcmp(cmd, "/stopengine",true) == 0) {
        new vid = GetPlayerVehicleID(playerid);
        if(vid != INVALID_VEHICLE_ID) {
            if(IsABBike(vid)) return SendClientMessage(playerid, COLOR_GRAD2, "This bike doesen't have engine!");
            GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
//                                 ||||||
            SetVehicleParamsEx(vid,VEHICLE_PARAMS_OFF,lights,alarm,doors,bonnet,boot,objective);
//Here the VEHICLE_PARAMS_OFF will turn off your engine.
        }
        return 1;
    }
si /fill
	}
	if(strcmp(cmd, "/fill", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
			if(IsAtGasStation(playerid))
			{
			    if(Gas[idcar] <= 99)
			    {
			    	TogglePlayerControllable(playerid, 0);
			    	GameTextForPlayer(playerid,"~w~~n~~n~~n~~n~~n~~n~~n~~n~~n~Re-Fueling Vehicle, please wait",2000,3);
					SetTimer("Fillup",RefuelWait,0);
					Refueling[playerid] = 1;
				}
				else
				{
				    GameTextForPlayer(playerid,"~r~~n~~n~~n~~n~~n~~n~~n~~n~~n~Gas can is full",2000,3);
				}
			}
			else
			{
				SendClientMessage(playerid,COLOR_GREY,"   You're not at a Gas Station!");
			}
		}
    	return 1;
	}

Link to comment
Share on other sites

7 answers to this question

Recommended Posts

pai raspunsu ti in intrebare:))...adik in alea /engine si /stopengine deci faci kam asa:

	if(strcmp(cmd, "/fill", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
			if(IsAtGasStation(playerid))
			{
				if(GetVehicleParamsEx(vid,VEHICLE_PARAMS_ON,lights,alarm,doors,bonnet,boot,objective);
				{
				    if(Gas[idcar] <= 99)
				    {
				    	TogglePlayerControllable(playerid, 0);
				    	GameTextForPlayer(playerid,"~w~~n~~n~~n~~n~~n~~n~~n~~n~~n~Re-Fueling Vehicle, please wait",2000,3);
						SetTimer("Fillup",RefuelWait,0);
						Refueling[playerid] = 1;
					}
					else
					{
				    	GameTextForPlayer(playerid,"~r~~n~~n~~n~~n~~n~~n~~n~~n~~n~Gas can is full",2000,3);
					}
				}
				else
				{
					SendClientMessage(playerid,COLOR_RED,"Please Stop your engine beggin refill!");
			}
			else
			{
				SendClientMessage(playerid,COLOR_RED,"You are not at a Gas Station!");
			}
		}
    	return 1;
	}

Fara reclama in semnatura!

Link to comment
Share on other sites

mia dat error

D:\Internet\Server Sa-Mp\samp03csvr_R2-2_win32\gamemodes\eGammer.pwn(2964) : error 004: function "GivePlayerCash" is not implemented
D:\Internet\Server Sa-Mp\samp03csvr_R2-2_win32\gamemodes\eGammer.pwn(2993) : error 004: function "GivePlayerCash" is not implemented
D:\Internet\Server Sa-Mp\samp03csvr_R2-2_win32\gamemodes\eGammer.pwn(3029) : error 004: function "SafeResetPlayerWeapons" is not implemented
D:\Internet\Server Sa-Mp\samp03csvr_R2-2_win32\gamemodes\eGammer.pwn(3030) : error 004: function "SafeGivePlayerWeapon" is not implemented
D:\Internet\Server Sa-Mp\samp03csvr_R2-2_win32\gamemodes\eGammer.pwn(3057) : error 004: function "SafeResetPlayerWeapons" is not implemented
D:\Internet\Server Sa-Mp\samp03csvr_R2-2_win32\gamemodes\eGammer.pwn(3580) : error 004: function "PlayerToPoint" is not implemented
D:\Internet\Server Sa-Mp\samp03csvr_R2-2_win32\gamemodes\eGammer.pwn(3592) : error 004: function "PlayerToPoint" is not implemented
D:\Internet\Server Sa-Mp\samp03csvr_R2-2_win32\gamemodes\eGammer.pwn(3604) : error 004: function "PlayerToPoint" is not implemented
D:\Internet\Server Sa-Mp\samp03csvr_R2-2_win32\gamemodes\eGammer.pwn(3616) : error 004: function "PlayerToPoint" is not implemented
D:\Internet\Server Sa-Mp\samp03csvr_R2-2_win32\gamemodes\eGammer.pwn(3620) : error 004: function "PlayerToPoint" is not implemented
D:\Internet\Server Sa-Mp\samp03csvr_R2-2_win32\gamemodes\eGammer.pwn(3632) : error 004: function "PlayerToPoint" is not implemented
D:\Internet\Server Sa-Mp\samp03csvr_R2-2_win32\gamemodes\eGammer.pwn(3636) : error 004: function "PlayerToPoint" is not implemented
D:\Internet\Server Sa-Mp\samp03csvr_R2-2_win32\gamemodes\eGammer.pwn(3640) : error 004: function "PlayerToPoint" is not implemented
D:\Internet\Server Sa-Mp\samp03csvr_R2-2_win32\gamemodes\eGammer.pwn(3644) : error 004: function "PlayerToPoint" is not implemented
D:\Internet\Server Sa-Mp\samp03csvr_R2-2_win32\gamemodes\eGammer.pwn(3648) : error 004: function "PlayerToPoint" is not implemented
D:\Internet\Server Sa-Mp\samp03csvr_R2-2_win32\gamemodes\eGammer.pwn(3652) : error 004: function "PlayerToPoint" is not implemented
D:\Internet\Server Sa-Mp\samp03csvr_R2-2_win32\gamemodes\eGammer.pwn(3656) : error 004: function "PlayerToPoint" is not implemented
D:\Internet\Server Sa-Mp\samp03csvr_R2-2_win32\gamemodes\eGammer.pwn(3660) : error 004: function "PlayerToPoint" is not implemented
D:\Internet\Server Sa-Mp\samp03csvr_R2-2_win32\gamemodes\eGammer.pwn(3672) : error 004: function "PlayerToPoint" is not implemented
D:\Internet\Server Sa-Mp\samp03csvr_R2-2_win32\gamemodes\eGammer.pwn(3676) : error 004: function "PlayerToPoint" is not implemented
D:\Internet\Server Sa-Mp\samp03csvr_R2-2_win32\gamemodes\eGammer.pwn(3680) : error 004: function "PlayerToPoint" is not implemented
D:\Internet\Server Sa-Mp\samp03csvr_R2-2_win32\gamemodes\eGammer.pwn(3684) : error 004: function "PlayerToPoint" is not implemented
D:\Internet\Server Sa-Mp\samp03csvr_R2-2_win32\gamemodes\eGammer.pwn(3688) : error 004: function "PlayerToPoint" is not implemented
D:\Internet\Server Sa-Mp\samp03csvr_R2-2_win32\gamemodes\eGammer.pwn(3700) : error 004: function "PlayerToPoint" is not implemented
D:\Internet\Server Sa-Mp\samp03csvr_R2-2_win32\gamemodes\eGammer.pwn(3704) : error 004: function "PlayerToPoint" is not implemented
D:\Internet\Server Sa-Mp\samp03csvr_R2-2_win32\gamemodes\eGammer.pwn(3708) : error 004: function "PlayerToPoint" is not implemented

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright (c) 1997-2006, ITB CompuPhase


26 Errors.

Link to comment
Share on other sites

if(strcmp(cmd, "/fill", true) == 0)

{

    if(IsPlayerConnected(playerid))

    {

if(IsAtGasStation(playerid))

{

if(GetVehicleParamsEx(vid,VEHICLE_PARAMS_ON,lights,alarm,doors,bonnet,boot,objective);

{

    if(Gas[idcar] <= 99)

    {

    TogglePlayerControllable(playerid, 0);

    GameTextForPlayer(playerid,"~w~~n~~n~~n~~n~~n~~n~~n~~n~~n~Re-Fueling Vehicle, please wait",2000,3);

SetTimer("Fillup",RefuelWait,0);

Refueling[playerid] = 1;

}

else

{

    GameTextForPlayer(playerid,"~r~~n~~n~~n~~n~~n~~n~~n~~n~~n~Gas can is full",2000,3);

}

}

else

{

SendClientMessage(playerid,COLOR_RED,"Please Stop your engine beggin refill!");

}

}

else

{

SendClientMessage(playerid,COLOR_RED,"You are not at a Gas Station!");

}

}

    return 1;

}

142sj0l.png

Underground-GFX

Link to comment
Share on other sites

Acum imi da erorile astea ....

D:\Internet\Server Sa-Mp\samp03csvr_R2-2_win32\gamemodes\eGammer.pwn(44527) : error 017: undefined symbol "vid"
D:\Internet\Server Sa-Mp\samp03csvr_R2-2_win32\gamemodes\eGammer.pwn(44527) : error 001: expected token: ")", but found ";"
D:\Internet\Server Sa-Mp\samp03csvr_R2-2_win32\gamemodes\eGammer.pwn(44527) : error 036: empty statement
D:\Internet\Server Sa-Mp\samp03csvr_R2-2_win32\gamemodes\eGammer.pwn(44527) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.

Link to comment
Share on other sites

Schimba if(GetVehicleParamsEx(vid,VEHICLE_PARAMS_ON,lights,alarm,doors,bonnet,boot,objective); in:

if( GetVehicleParamsEx( vid, VEHICLE_PARAMS_ON, lights, alarm, doors, bonnet, boot, objective ) )

PRAF !

Corect:

if(strcmp(cmd, "/fill", true) == 0)
{
	if( !IsAtGasStation(playerid) ) return SendClientMessage(playerid,COLOR_RED,"You are not at a Gas Station!");

	new vid = GetPlayerVehicleID( playerid );
	GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
	if( engine == VEHICLE_PARAMS_ON ) return SendClientMessage(playerid,COLOR_RED,"Please Stop your engine beggin refill!");

	if(Gas[idcar] <= 99)
	{
		TogglePlayerControllable(playerid, 0);
		GameTextForPlayer(playerid,"~w~~n~~n~~n~~n~~n~~n~~n~~n~~n~Re-Fueling Vehicle, please wait",2000,3);
		SetTimer("Fillup",RefuelWait,0);
		Refueling[playerid] = 1;
	}
	else
	{
		GameTextForPlayer(playerid,"~r~~n~~n~~n~~n~~n~~n~~n~~n~~n~Gas can is full",2000,3);
	}
	return 1;
}

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.