Jump to content
  • 0

Problema


Sammich

Question

Problema intalnita (descriere): Am creat niste texdrawuri,si vreau sa ma ajutati sa fac ceva,eu nu reusesc,si eu vreau ca depaseste 25km/h sa dispara TextDraw-ul asta Farmer4
Ero(area / rile) / warning-(ul / urile):
Liniile de cod / sursa / script-ul(obligatoriu):

==============================================================================================================================

public SetFarm(playerid)
{
    if(playerVariables[playerid][pJob] == 9)
    {
        if(Farm[playerid] == 1)
        {
            if(IsPlayerInRangeOfPoint(playerid, 200.0, -381.9549,-1439.0001,25.7266))
            {
                if(IsPlayerInAnyVehicle(playerid))
                {
                    if(!IsPlayerPaused(playerid))
                    {
                        new veh = GetPlayerVehicleID(playerid);
                        if(vehicleVariables[veh][vVehicleJob] == 9)
                        {
                            new string[256];
                            new speed;
                            speed = GetVehicleSpeed(veh);
                            if(speed >= 25)
                            {
                                playerVariables[playerid][pFarmTime]--;
                                format(string, 256, "Munceste pentru inca ~r~ %d~w~ secunde pentru a fi platit", playerVariables[playerid][pFarmTime]);
                                TextDrawSetString(Farmer1[playerid], string);
                                TextDrawShowForPlayer(playerid, Farmer1[playerid]);
                                TextDrawShowForPlayer(playerid, Farmer2[playerid]);
                                TextDrawShowForPlayer(playerid, Farmer3[playerid]);
                                TextDrawShowForPlayer(playerid, Farmer4[playerid]);
                            }
                            if(playerVariables[playerid][pFarmTime] == 1)
                            {
                                SetVehicleToRespawn(GetPlayerVehicleID(playerid));
                                TextDrawHideForPlayer(playerid, Farmer1[playerid]);
                                TextDrawHideForPlayer(playerid, Farmer2[playerid]);
                                TextDrawHideForPlayer(playerid, Farmer3[playerid]);
                                TextDrawHideForPlayer(playerid, Farmer4[playerid]);
                                new rand;
                                rand = 15 + random(10);
                                format(szMessage, sizeof(szMessage), "SMS: Ai primit %d kilograme de faina pentru munca ta, Sender: Gigi.Fermierul (222222).", rand);
                                SCM(playerid, COLOR_YELLOW, szMessage);
                                SCM(playerid, COLOR_GREEN, "Pentru a vinde faina, mergi la un Burgher / Fast-Food in apropiere.");
                                playerVariables[playerid][pGrainKG] = rand;
                                KillTimer(farmtimer[playerid]);
                            }
                               else
                            {
                                TextDrawShowForPlayer(playerid, Farmer4[playerid]);
                            }
                        }
                    }
                }
            }
            else
            {
                GameTextForPlayer(playerid, "~r~You are not in the farm area.", 3000, 1);
            }
        }
    }
    return 1;
}

============================================================================================================
Imagini / Video (optional):
Ati incercat sa rezolvati singur?: Da

 
Link to comment
Share on other sites

12 answers to this question

Recommended Posts

  • 0
  • 0

Cum adica?

 

:)) Aici e sectiunea in care rezolvam probleme de scripting, nu oferim scripturi.

Daca ar venii toti cu rugamintea sa le facem ceva, atunci de unde clienti in privat?

Nu ti-am cerut nici un script,din cate poti vedea am zis ca vreau sa fac ca atunci cand depasesc viteza de 25KM/H sa imi stearga texdraw-ul Farmer4,eu am incercat sa pun

 

Cum ai tu spedometer-ul?

Cum adica?

 
Link to comment
Share on other sites

  • 0
  • 0

arata cum e textdraw-ul la spedometer, da-mi tot ce tine de el

 

Asta zici tu?

 stockGetPlayerSpeed(playerid, get3d) // Need this for fixcar
{
	new
		Float:Floats[3];

	if(IsPlayerInAnyVehicle(playerid))
	    GetVehicleVelocity(GetPlayerVehicleID(playerid), Floats[0], Floats[1], Floats[2]);
	else
	    GetPlayerVelocity(playerid, Floats[0], Floats[1], Floats[2]);

	return SpeedCheck(Floats[0], Floats[1], Floats[2], 100.0, get3d);
}
 
Link to comment
Share on other sites

  • 0
  • 0

Imi da eroare asta :

D:\Gamemoduri\bugged!\gamemodes\rpg.pwn(6041) : error 029: invalid expression, assumed zero
D:\Gamemoduri\bugged!\gamemodes\rpg.pwn(6041) : warning 215: expression has no effect
D:\Gamemoduri\bugged!\gamemodes\rpg.pwn(6041) : error 001: expected token: ";", but found ")"
D:\Gamemoduri\bugged!\gamemodes\rpg.pwn(6041) : error 029: invalid expression, assumed zero
D:\Gamemoduri\bugged!\gamemodes\rpg.pwn(6041) : 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.

Linia 6041 este asta :

if(GetPlayerSpeed(i, > 0) > 25)
 
Link to comment
Share on other sites

  • 0

Imi da erroare asta :

D:\Gamemoduri\bugged!\gamemodes\rpg.pwn(6054) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664	 	 	Copyright (c) 1997-2006, ITB CompuPhase

Header size:          22816 bytes
Code size:          2407152 bytes
Data size:          5773108 bytes
Stack/heap size:     180000 bytes; estimated max. usage: unknown, due to recursion
Total requirements: 8383076 bytes

1 Warning.

 

Si linia 6054 este asta :

new playerspeed = GetPlayerSpeed(i);
 
Link to comment
Share on other sites

  • 0

Pai am pus asta :

forward                 SpeedLimitJob();

apoi asta :

public SpeedLimitJob()
{
    foreach(Player, i)
    {
        new playerspeed = GetPlayerSpeed(i);
        if(playerspeed > 25)
	    {
		    TextDrawHideForPlayer(i, Farmer4[i]);
	    }
    }
    return 1;
}

apoi am pus asta la OnGamemodInt :

SetTimer("SpeedPlayerJob", 1000, 1);

atat

 
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.