Jump to content
  • 0

putin ajutor va rog


laury

Question

5 answers to this question

Recommended Posts

Daca vrei cu o comanda, poti incerca ceva in genu:

       
if(strcmp(cmd, "/reparatie", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
			    if (PlayerToPoint(3.0, playerid,359.5408,206.7693,1008.3828))
				{
                                           if(IsPlayerInAnyVehicle(playerid)
                                           {
                                               RepairVehicle(GetPlayerVehicleID(playerid));
                                            }
             }
       }
       return 1;
    }
sau pe la
 public CustomPickups() 
ceva in genu:
 if (PlayerToPoint(2.0, i, 1173.2563,-1323.3102,15.3943))
			{
				if(IsPlayerInAnyVehicle(playerid)
                                {
                                               RepairVehicle(GetPlayerVehicleID(playerid));//in loc de repair poti pune ShowMenuForPlayer .. si iti creezi un meniu ca in tunning si restul (AddVehicleComponent, GivePlayerMoney,etc)
                                }
			}

Link to comment
Share on other sites

Sub asta : RepairVehicle(GetPlayerVehicleID(playerid));

Adaugi : GivePlayerMoney(playerid, -x);

Unde "-x" inseamna suma de bani pe care vrei sa i-o scada.

Exemplu :  GivePlayerMoney(playerid, -3000);

In exemplul de mai sus ii va scadea 3000 $.

Emanuell esti jalnic sincer , /reparatie auzi.

Link to comment
Share on other sites

CEA MAI MARE PROSTIE : SA VERIFICI DACA PLAYERUL E CONECTAT CAND SCRIE O COMANDA ! IDIOTENIE PE FATA .

if(strcmp(cmd, "/reparatie", true) == 0)
   {
       if(GetPlayerMoney(playerid) >= 3000 )
       {
             if (PlayerToPoint(3.0, playerid,359.5408,206.7693,1008.3828))
            {
                                           if(IsPlayerInAnyVehicle(playerid)
                                           {
                                               RepairVehicle(GetPlayerVehicleID(playerid));
                                               GivePlayerMoney(playerid, -3000);
                                            }
             }
       }else SendClientMessage(playerid, COLOR, "N-ai bani.");
       return 1;
    }

-Toate tutorialele postate intra aici sau puneti-le direct [url=http://www.sa-mp.ro/forum/index

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.