Jump to content
  • 0

Ajutor! Refueling all vehicle!


Pinki95

Question

13 answers to this question

Recommended Posts

pai cu ce? stiu ca te referi la benzina dar nu vreau daca te ajut si iti fac tot , tu ce mai faci?

seteaza variabila care iti seteaza tie fuel la 1000 sau ma rog la cat e max,,

Eu sunt nimeni. Dar prefer sa fiu un nimeni inconjurat de prieteni adevarati, decat un om faimos inconjurat de falsi.

Nu sunt un scripter perfect, nu sunt nici macar pe aproape, insa in in ciuda acestui fapt incerc sa invat sa le fac pe toate.

Link to comment
Share on other sites

Comanda: /fuelcars

if(strcmp(cmd, "/fuelcars", true) == 0) by Darksone
	{
	    if(IsPlayerConnected(playerid))
	    {
	        if(PlayerInfo[playerid][pAdmin] >= 3)
	        {
	            for(new c=0;c<CAR_AMOUNT;c++)
				{
					Gas[c] = GasMax;
				}
				SendClientMessage(playerid, COLOR_GREY, "   All cars filled with Fuel ! ");
	        }
	        else
	        {
	            SendClientMessage(playerid, COLOR_GREY, "   You are not an Admin ! ");
	            return 1;
	        }
	    }
	    return 1;
	}
Comanda este stabilita pentru admin-ul level 3:
 if(PlayerInfo[playerid][pAdmin] >= 3)
Daca doresti sa schimbi level-ul accesului la comanda modifica acel 3 pentru alt level admin
[pAdmin] >= 3)

Ce face aceasta comanda?

-  Umple rezervorul la toate masinile de pe server cu 100 fuel.

Rareori ne gândim la ceea ce avem, dar mereu la ceea ce ne lipseşte

Link to comment
Share on other sites

Am incercat sa fac asa dar imi da erori:

C:\Documents and Settings\vio\Desktop\Untitled.pwn(89) : error 017: undefined symbol "cmd"

C:\Documents and Settings\vio\Desktop\Untitled.pwn(89) : error 017: undefined symbol "by"

C:\Documents and Settings\vio\Desktop\Untitled.pwn(89) : error 017: undefined symbol "Darksone"

C:\Documents and Settings\vio\Desktop\Untitled.pwn(89) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase

4 Errors.

560x95_F01616_1625F2_030303_000000.png
Link to comment
Share on other sites

Am incercat sa fac asa dar imi da erori:

C:\Documents and Settings\vio\Desktop\Untitled.pwn(89) : error 017: undefined symbol "cmd"

C:\Documents and Settings\vio\Desktop\Untitled.pwn(89) : error 017: undefined symbol "by"

C:\Documents and Settings\vio\Desktop\Untitled.pwn(89) : error 017: undefined symbol "Darksone"

C:\Documents and Settings\vio\Desktop\Untitled.pwn(89) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase

4 Errors.

if(strcmp(cmd, "/fuelcars", true) == 0) // by Darksone
	{
	    if(IsPlayerConnected(playerid))
	    {
	        if(PlayerInfo[playerid][pAdmin] >= 3)
	        {
	            for(new c=0;c<CAR_AMOUNT;c++)
				{
					Gas[c] = GasMax;
				}
				SendClientMessage(playerid, COLOR_GREY, "   All cars filled with Fuel ! ");
	        }
	        else
	        {
	            SendClientMessage(playerid, COLOR_GREY, "   You are not an Admin ! ");
	            return 1;
	        }
	    }
	    return 1;
	}

Link to comment
Share on other sites

Nu merge sau nu stiu eu unde sa le bag ca le-am pus intr-un fs la sectiunea OnPlayerCommandText si imi da erorile respective iar daca fac un include cu acel code si imi da urmatoarele erori daca adaug acel include:

C:\Documents and Settings\vio\Desktop\™Server™\pawno\include\Benzina.inc(1) : error 010: invalid function or declaration

C:\Documents and Settings\vio\Desktop\™Server™\pawno\include\Benzina.inc(3) : error 010: invalid function or declaration

C:\Documents and Settings\vio\Desktop\™Server™\pawno\include\Benzina.inc(5) : error 010: invalid function or declaration

C:\Documents and Settings\vio\Desktop\™Server™\pawno\include\Benzina.inc(7) : error 010: invalid function or declaration

C:\Documents and Settings\vio\Desktop\™Server™\pawno\include\Benzina.inc(13) : error 010: invalid function or declaration

C:\Documents and Settings\vio\Desktop\™Server™\pawno\include\Benzina.inc(16) : error 010: invalid function or declaration

C:\Documents and Settings\vio\Desktop\™Server™\pawno\include\Benzina.inc(19) : error 010: invalid function or declaration

C:\Documents and Settings\vio\Desktop\Untitled.pwn(90) : error 017: undefined symbol "cmd"

C:\Documents and Settings\vio\Desktop\Untitled.pwn(90) : error 017: undefined symbol "by"

C:\Documents and Settings\vio\Desktop\Untitled.pwn(90) : error 017: undefined symbol "Darksone"

C:\Documents and Settings\vio\Desktop\Untitled.pwn(90) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase

11 Errors.

560x95_F01616_1625F2_030303_000000.png
Link to comment
Share on other sites

Am pus eu : "By Darksone"

if(strcmp(cmd, "/fuelcars", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
	        if(PlayerInfo[playerid][pAdmin] >= 3)
	        {
	            for(new c=0;c<CAR_AMOUNT;c++)
				{
					Gas[c] = GasMax;
				}
				SendClientMessage(playerid, COLOR_GREY, "   All cars filled with Fuel ! ");
	        }
	        else
	        {
	            SendClientMessage(playerid, COLOR_GREY, "   You are not an Admin ! ");
	            return 1;
	        }
	    }
	    return 1;
	}

IA INCEARCA ACUMA!

Rareori ne gândim la ceea ce avem, dar mereu la ceea ce ne lipseşte

Link to comment
Share on other sites

Darksone daca face cum zici tu nu o sa ii puna pentru toate vehiculele.

Incearca asa:

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

{

    if(IsPlayerConnected(playerid))

    {

        if(PlayerInfo[playerid][pAdmin] >= 3)

        {

            for(new c=1;c<MAX_VEHICLES;c++)

    {

if(IsValidVehicle©)

{

Gas[c] = GasMax;

}

    }

    SendClientMessage(playerid, COLOR_GREY, "  All cars filled with Fuel ! ");

        }

        else

        {

            SendClientMessage(playerid, COLOR_GREY, "  You are not an Admin ! ");

            return 1;

        }

    }

    return 1;

}[/pawn]

Dar trebuie sa il bag in include la PPC_PlayerCommands.inc sau sa fac un filterscripts cu acel code

Asta nu stim, poate are alt sistem de admin si trebuie sa schimbi PlayerInfo[playerid][pAdmin]

 

1859311972_BANNER-GIREADAcopy-min.thumb.png.48e5e420ae2185dce5b244965a1d2601.png

 

Link to comment
Share on other sites

Uite o comanda de alimentat masina dar numai masina in care esti nu toate masinile poate va ajuta sa ma ajutati:

// Refuel the player's vehicle

COMMAND:fuel(playerid, params[])

{

// Setup local variables

new vID;

// Send the command to all admins so they can see it

SendAdminText(playerid, "/fuel", params);

// Check if the player has logged in

if (APlayerData[playerid][LoggedIn] == true)

{

// Check if the player's admin-level is at least 1

if (APlayerData[playerid][PlayerLevel] >= 1)

{

// Check if the player is inside a vehicle

if (IsPlayerInAnyVehicle(playerid))

{

    // Get the vehicleid

    vID = GetPlayerVehicleID(playerid);

    // Refuel the vehicle

    AVehicleData[vID][Fuel] = MaxFuel;

// Let the player know about it

SendClientMessage(playerid, 0x00FF00FF, "Your vehicle is refuelled");

}

else

SendClientMessage(playerid, 0x00FF00FF, "You're not driving a vehicle");

}

else

    return 0;

}

else

    return 0;

560x95_F01616_1625F2_030303_000000.png
Link to comment
Share on other sites

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.