Jump to content

Question

Posted

Salut prieteni, am un gamemode edit bigzone insa am o mica problema, cand repar masina in pns sau intru sa tunez masina in tunning pur si simplu nu imi baga banii in biz, aveti o idee?

public AfterSpray(playerid)
{
	new carid = GetPlayerVehicleID(playerid),
		Float:health,
		string[MAX_STRING];
    if(IsPlayerInRangeOfPoint(playerid,15.0,1025.0671,-1023.7895,32.1016))
	{
	    GetVehicleHealth(carid, health);
	    if(health == 1000.0)
	    {
			Cash[playerid] -= BizzInfo[36][bEntranceCost];
			Update(playerid, pCashx);
			BizzInfo[36][bTill] += BizzInfo[36][bEntranceCost];
			new str[128];
			mysql_format(SQL,str,sizeof(str),"UPDATE `bizz` SET `Till`='%d' WHERE `ID`='36'",BizzInfo[36][bTill]);
			mysql_tquery(SQL,str,"","");
			format(string,sizeof(string),"~r~-%d$", BizzInfo[36][bEntranceCost]);
   			GameTextForPlayer(playerid, string, 5000, 1);
			return 1;
		}
if(IsPlayerInRangeOfPoint(playerid,15.0,487.4134,-1740.1738,11.1370))
	{
	    GetVehicleHealth(carid, health);
	    if(health == 1000.0)
	    {
			Cash[playerid] -= BizzInfo[37][bEntranceCost];
			Update(playerid, pCashx);
			BizzInfo[37][bTill] += BizzInfo[37][bEntranceCost];
			new str[128];
			mysql_format(SQL,str,sizeof(str),"UPDATE `bizz` SET `Till`='%d' WHERE `ID`='37'",BizzInfo[37][bTill]);
			mysql_tquery(SQL,str,"","");
			format(string,sizeof(string),"~r~-%d$", BizzInfo[37][bEntranceCost]);
   			GameTextForPlayer(playerid, string, 5000, 1);
			return 1;
		}
	}

Multumesc anticipat!

9 answers to this question

Recommended Posts

  • 0
Posted
Acum 4 ore, ciockikostner a spus:

Salut prieteni, am un gamemode edit bigzone insa am o mica problema, cand repar masina in pns sau intru sa tunez masina in tunning pur si simplu nu imi baga banii in biz, aveti o idee?


public AfterSpray(playerid)
{
	new carid = GetPlayerVehicleID(playerid),
		Float:health,
		string[MAX_STRING];
    if(IsPlayerInRangeOfPoint(playerid,15.0,1025.0671,-1023.7895,32.1016))
	{
	    GetVehicleHealth(carid, health);
	    if(health == 1000.0)
	    {
			Cash[playerid] -= BizzInfo[36][bEntranceCost];
			Update(playerid, pCashx);
			BizzInfo[36][bTill] += BizzInfo[36][bEntranceCost];
			new str[128];
			mysql_format(SQL,str,sizeof(str),"UPDATE `bizz` SET `Till`='%d' WHERE `ID`='36'",BizzInfo[36][bTill]);
			mysql_tquery(SQL,str,"","");
			format(string,sizeof(string),"~r~-%d$", BizzInfo[36][bEntranceCost]);
   			GameTextForPlayer(playerid, string, 5000, 1);
			return 1;
		}
if(IsPlayerInRangeOfPoint(playerid,15.0,487.4134,-1740.1738,11.1370))
	{
	    GetVehicleHealth(carid, health);
	    if(health == 1000.0)
	    {
			Cash[playerid] -= BizzInfo[37][bEntranceCost];
			Update(playerid, pCashx);
			BizzInfo[37][bTill] += BizzInfo[37][bEntranceCost];
			new str[128];
			mysql_format(SQL,str,sizeof(str),"UPDATE `bizz` SET `Till`='%d' WHERE `ID`='37'",BizzInfo[37][bTill]);
			mysql_tquery(SQL,str,"","");
			format(string,sizeof(string),"~r~-%d$", BizzInfo[37][bEntranceCost]);
   			GameTextForPlayer(playerid, string, 5000, 1);
			return 1;
		}
	}

Multumesc anticipat!

Pe server ai doar 2 pns-uri? Repari masina la bizul cu id 36 sau 37?

  • 0
Posted

Normal ca nu merge dupa logica mea de copilas mic. Tu ai pus acolo sa verifice ca daca masina are 1000.0 viata ( adica daca e perfecta ) sa se execute codurile de mai jos, modifica 

 if(health == 1000.0)

cu

 if(health < 1000.0)

 

  • 0
Posted
Acum 22 ore, andy47 a spus:

Normal ca nu merge dupa logica mea de copilas mic. Tu ai pus acolo sa verifice ca daca masina are 1000.0 viata ( adica daca e perfecta ) sa se execute codurile de mai jos, modifica 


 if(health == 1000.0)

cu


 if(health < 1000.0)

 

tot nu merge

  • 0
Posted
Acum 2 ore, ciockikostner a spus:

forward AfterSpray(playerid);

 

Nu chemi functia dintr-un forward, cauta in gm "AfterSpray(" fara ghilimele. Unde aprare de acolo o chemi.

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.