Jump to content
  • 0

Question

Posted

Sall am si eu o problema :o3 Cnad dau /fill la gaz station zice "unknown comand" iar daca dau in alta parte  zice "you`re not at gas station" nu inteleg de ce zice ca nu exista comanda :-??

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

{

    if(IsPlayerConnected(playerid))

    {

if(IsAtGasStation(playerid))

{

                if(Gas[gLastCar[playerid]] > 100)

{

SendClientMessage(playerid,COLOR_GREY,"  You have more than 100 fuel.");

return 1;

}

    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

{

SendClientMessage(playerid,COLOR_GREY,"  You're not at a Gas Station!");

}

}

    return 1;

}

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

{

    if(IsPlayerConnected(playerid))

    {

    if(PlayerInfo[playerid][pFuel] > 0)

    {

        if(Gas[gLastCar[playerid]] < 81)

        {

        SendClientMessage(playerid, COLOR_LIGHTBLUE, "  You filled your car with 20 percent Fuel from your Gas Can.");

        Gas[gLastCar[playerid]] += 20;

        PlayerInfo[playerid][pFuel] = 0;

}

else

{

    SendClientMessage(playerid, COLOR_GREY, "  Your Car still got enough Fuel to drive with !");

}

    }

    else

    {

        SendClientMessage(playerid, COLOR_GREY, "  You have no Fuel left in your Gas Can !");

    }

}

return 1;

}[/pawn]

2 answers to this question

Recommended Posts

Posted

Incearca:

Comanda:/fill

         if(strcmp(cmd, "/fill", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
			if(IsAtGasStation(playerid))
			{
                TogglePlayerControllable(playerid, 0);
  				format(string,sizeof(string),"Fuel: Se alimenteaza...");
				TextDrawSetString(vFuel[playerid], string);
				TextDrawShowForPlayer(playerid, vFuel[playerid]);
				SetTimer("Fillup",RefuelWait,0);
				Refueling[playerid] = 1;
			}
			else
			{
				SendClientMessage(playerid,COLOR_GREY,"{30a030}[saveG]: {ffffff}Ne pare rau, dar nu te afli intr-o Statie de Gas.");
			}
		}
    	return 1;
	}
Comanda: /fillcar
if(strcmp(cmd, "/fillcar", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
		    if(PlayerInfo[playerid][pFuel] > 0)
		    {
		        if(Gas[gLastCar[playerid]] < 81)
		        {
			        SendClientMessage(playerid, COLOR_LIGHTBLUE, "» Felicitari, ai alimentat Vehiculul cu 20 Fuel.");
			        Gas[gLastCar[playerid]] += 20;
			        PlayerInfo[playerid][pFuel] = 0;
				}
				else
				{
				    SendClientMessage(playerid, COLOR_GREY, "» Vehiculul tau are combustibil necesar.");
				}
		    }
		    else
		    {
		        SendClientMessage(playerid, COLOR_GREY, "» Ne pare rau, dar nu aveti Fuel in Canistra.");
		    }
		}
		return 1;
	}

LISTA - GAMEMODE-URI SA-MP - Le gasiti pe toate aici: http://twiriock.com/3MGP

Guest
This topic is now closed to further replies.
×
×
  • 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.