Jump to content

only4fun

Membru
  • Posts

    39
  • Joined

  • Last visited

    Never

Posts posted by only4fun

  1. DestroyVehicle(ownvehkey);
    CreateVehicle(CarInfo[ownvehkey][cModel],CarInfo[ownvehkey][cLocationx],CarInfo[ownvehkey][cLocationy],CarInfo[ownvehkey][cLocationz]+1.0,CarInfo[ownvehkey][cAngle],CarInfo[ownvehkey][cColorOne],CarInfo[ownvehkey][cColorTwo],60000);

    E ceva neinregula cu acest script?

    Nu stiu de ce nu merge CarInfo[ownvehkey][cModel]..adica nu se pastreaza acelasi model, se schimba..dar faza e ca se schimba doar o singura data:)

  2. Aici am tot codul "/v"

    Mai am o problema..cumpar o masina, o parchez..iar imediat cand scriu "/v park" se schimba skinul la masina (si idul masinii) iar apoi cand ies de pe server si intru iar masina e parcata acolo dar nu mai are acelasi proprietar.

    if(strcmp(cmd, "/v", true) == 0 || strcmp(cmd, "/vehicle", true) == 0) // By Ellis

    {

        if(IsPlayerConnected(playerid))

        {

            if(gPlayerLogged[playerid] == 0)

            {

                SendClientMessage(playerid, COLOR_GREY, "  You need to login first ! ");

                return 1;

            }

          new x_nr[256];

            x_nr = strtok(cmdtext, idx);

              if (!strlen( x_nr ))

              {

                SendClientMessage(playerid, COLOR_WHITE, "HINT: (/v)ehicle [name]");

                SendClientMessage(playerid, COLOR_WHITE, "Available names: park, lock(1-3), sell, sellto, color ");

                return 1;

              }

            if(strcmp(x_nr,"sell",true) == 0)

            {

                if(IsAtDealership(playerid))

                {

                    if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey1] || GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey2])

                    {

                        GetPlayerName(playerid, sendername, sizeof(sendername));

                        new ownvehkey;

                        if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey1]) { ownvehkey = PlayerInfo[playerid][pPcarkey1]; }

                        else if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey2]) { ownvehkey = PlayerInfo[playerid][pPcarkey2]; }

                        else { return 1; }

                        if(strcmp(sendername, CarInfo[ownvehkey][cOwner], true) == 0)

                        {

                            new carsellprice = CarInfo[ownvehkey][cValue] / 4 * 3;

                            new Float:x,Float:y,Float:z;

                            new Float:a;

                            CarInfo[ownvehkey][cOwned] = 0;

                            strmid(CarInfo[ownvehkey][cOwner], "Dealership", 0, strlen("Dealership"), 999);

                            GivePlayerMoney(playerid,carsellprice);

                            PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);

                            format(string, sizeof(string), "~w~You have sold your car for: ~n~~g~$%d", carsellprice);

                            GameTextForPlayer(playerid, string, 10000, 3);

                            GetVehiclePos(ownvehkey, x, y, z);

                            GetVehicleZAngle(ownvehkey, a);

                            CarInfo[ownvehkey][cLocationx] = x;

                            CarInfo[ownvehkey][cLocationy] = y;

                            CarInfo[ownvehkey][cLocationz] = z;

                            CarInfo[ownvehkey][cAngle] = a;

                            if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey1]) { PlayerInfo[playerid][pPcarkey1] = 999; }

                            else if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey2]) { PlayerInfo[playerid][pPcarkey2] = 999; }

                            RemovePlayerFromVehicle(playerid);

                            TogglePlayerControllable(playerid, 1);

                            if(PlayerInfo[playerid][pLocal] == ownvehkey)

                            {

                                SetPlayerInterior(playerid,0);

                                SetPlayerPos(playerid,CarInfo[ownvehkey][cLocationx],CarInfo[ownvehkey][cLocationy],CarInfo[ownvehkey][cLocationz]);

                                PlayerInfo[playerid][pInt] = 0;

                            }

                            OnPropUpdate();

                            OnPlayerUpdate(playerid);

                            DestroyVehicle(ownvehkey);

    CreateVehicle(CarInfo[ownvehkey][cModel],CarInfo[ownvehkey][cLocationx],CarInfo[ownvehkey][cLocationy],CarInfo[ownvehkey][cLocationz]+1.0,CarInfo[ownvehkey][cAngle],CarInfo[ownvehkey][cColorOne],CarInfo[ownvehkey][cColorTwo],60000);

                            return 1;

                        }

                    }

                    else

                    {

                        SendClientMessage(playerid, COLOR_GREY, "  You have to sit at your own car to sell it! ");

                        return 1;

                    }

                }

                else

                {

                    SendClientMessage(playerid, COLOR_GREY, "You are not at a dealership");

                    return 1;

                }

            }

            else if(strcmp(x_nr,"sellto",true) == 0)

            {

    if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey1] || GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey2])

    {

        GetPlayerName(playerid, sendername, sizeof(sendername));

        new ownvehkey;

                    if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey1]) { ownvehkey = PlayerInfo[playerid][pPcarkey1]; }

                    else if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey2]) { ownvehkey = PlayerInfo[playerid][pPcarkey2]; }

            else { return 1; }

        if(strcmp(sendername, CarInfo[ownvehkey][cOwner], true) == 0)

        {

    tmp = strtok(cmdtext, idx);

    if(!strlen(tmp))

    {

        SendClientMessage(playerid, COLOR_WHITE, "HINT: /v sellto [playerid/PartOfName] [price]");

        return 1;

    }

    giveplayerid = ReturnUser(tmp);

    if(IsPlayerConnected(giveplayerid))

    {

    if(giveplayerid != INVALID_PLAYER_ID)

    {

        if(ProxDetectorS(8.0, playerid, giveplayerid))

          {

        if(PlayerInfo[giveplayerid][pPcarkey1] == 999)

        {

                tmp = strtok(cmdtext, idx);

                if(!strlen(tmp))

                {

                    SendClientMessage(playerid, COLOR_WHITE, "HINT: /v sellto [playerid/PartOfName] [price]");

                    return 1;

                }

                new price;

                price = strval(tmp);

                if(price < 1 || price > 1500000)

                {

                    SendClientMessage(playerid, COLOR_GREY, "  Price not lower then 1 and not higher then 1500000. ");

                    return 1;

                }

                GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));

          format(string, sizeof(string), "* You offerd %s to buy your car for $%d .", giveplayer, price);

            SendClientMessage(playerid, COLOR_WHITE, string);

            format(string, sizeof(string), "* Car Owner %s offered you to buy his/her car for $%d (type /accept ownablecar) to buy.", playername, price);

            SendClientMessage(giveplayerid, COLOR_WHITE, string);

            OwnableCarOffer[giveplayerid] = playerid;

            OwnableCarID[giveplayerid] = ownvehkey;

            OwnableCarPrice[giveplayerid] = price;

            return 1;

            }

            else if(PlayerInfo[giveplayerid][pPcarkey2] == 999)

            {

                tmp = strtok(cmdtext, idx);

                if(!strlen(tmp))

                {

                    SendClientMessage(playerid, COLOR_WHITE, "HINT: /v sellto [playerid/PartOfName] [price]");

                    return 1;

                }

                new price;

                price = strval(tmp);

                if(price < 1 || price > 1500000)

                {

                    SendClientMessage(playerid, COLOR_GREY, "  Price not lower then 1 and not higher then 1500000. ");

                    return 1;

                }

                GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));

          format(string, sizeof(string), "* You offerd %s to buy your car for $%d .", giveplayer, price);

            SendClientMessage(playerid, COLOR_WHITE, string);

            format(string, sizeof(string), "* Car Owner %s offered you to buy his/her car for $%d (type /accept ownablecar) to buy.", playername, price);

            SendClientMessage(giveplayerid, COLOR_WHITE, string);

            OwnableCarOffer[giveplayerid] = playerid;

            OwnableCarID[giveplayerid] = ownvehkey;

            OwnableCarPrice[giveplayerid] = price;

            return 1;

            }

        }

        else

        {

            SendClientMessage(playerid, COLOR_GREY, "  Player is not near you ! ");

            return 1;

        }

    }

    }

        }

        else

        {

            SendClientMessage(playerid, COLOR_GREY, "  This is not your car");

            return 1;

        }

    }

    else

    {

        SendClientMessage(playerid, COLOR_GREY, "  You have to sit at your own car to sell it");

        return 1;

    }

            }

            else if(strcmp(x_nr,"park",true) == 0)

            {

                new Float:x,Float:y,Float:z;

    new Float:a;

    new carid;

    new getcarid;

    if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey1]) { carid = PlayerInfo[playerid][pPcarkey1]; }

    else if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey2]) { carid = PlayerInfo[playerid][pPcarkey2]; }

    else { return 1; }

    getcarid = GetPlayerVehicleID(playerid);

    GetPlayerName(playerid, playername, sizeof(playername));

    GetVehiclePos(carid, x, y, z);

    //GetPlayerFacingAngle(playerid, a);

    GetVehicleZAngle(carid, a);

    if(IsPlayerInVehicle(playerid,carid) && CarInfo[carid][cOwned] == 1)

    {

      if(PlayerInfo[playerid][pPcarkey1] == 999 && PlayerInfo[playerid][pPcarkey2] == 999)

    {

    SendClientMessage(playerid, COLOR_GREY, "You don't own a car.");

    return 1;

    }

    if(getcarid == carid)

    {

    CarInfo[carid][cLocationx] = x;

    CarInfo[carid][cLocationy] = y;

    CarInfo[carid][cLocationz] = z;

    CarInfo[carid][cAngle] = a;

    format(string, sizeof(string), "~n~ You have parked your vehicle in this location. ~n~");

    GameTextForPlayer(playerid, "You have parked your vehicle in this position. It will respawn here.", 10000, 3);

    OnPropUpdate();

    OnPlayerUpdate(playerid);

    DestroyVehicle(carid);

    CreateVehicle(CarInfo[carid][cModel],CarInfo[carid][cLocationx],CarInfo[carid][cLocationy],CarInfo[carid][cLocationz]+1.0,CarInfo[carid][cAngle],CarInfo[carid][cColorOne],CarInfo[carid][cColorTwo],60000);

          TogglePlayerControllable(playerid, 1);

    return 1;

      }

    }

            }

            else if(strcmp(x_nr,"lock1",true) == 0)

            {

                    new keycar = PlayerInfo[playerid][pPcarkey1];

                    if(keycar != 999)

                    {

                        new locked[256];

                        locked = strtok(cmdtext, idx);

                        if(CarInfo[keycar][cLock] == 1)

                        {

                        for(new i = 0; i < MAX_PLAYERS; i++)

    {

    if (IsPlayerConnected(i))

    {

    SetVehicleParamsForPlayer(keycar,i,0,0);

    }

    }

    format(string, sizeof(string), "~w~Vehicle~n~~g~Unlocked");

    GameTextForPlayer(playerid, string, 4000, 3);

    CarInfo[keycar][cLock] = 0;

    OnPropUpdate();

    return 1;

    }

    else if(CarInfo[keycar][cLock] == 0)

    {

        for(new i = 0; i < MAX_PLAYERS; i++)

    {

    if (IsPlayerConnected(i))

    {

    SetVehicleParamsForPlayer(keycar,i,0,1);

    }

    }

    format(string, sizeof(string), "~w~Vehicle~n~~r~Locked");

    GameTextForPlayer(playerid, string, 4000, 3);

    CarInfo[keycar][cLock] = 1;

    OnPropUpdate();

    return 1;

    }

                    }

                    else

                    {

                        SendClientMessage(playerid, COLOR_GREY, "  You don't have a vehicle at slot 1");

                        return 1;

                    }

            }

            else if(strcmp(x_nr,"lock2",true) == 0)

            {

                    new keycar = PlayerInfo[playerid][pPcarkey2];

                    if(keycar != 999)

                    {

                        new locked[256];

                        locked = strtok(cmdtext, idx);

                        if(CarInfo[keycar][cLock] == 1)

                        {

                        for(new i = 0; i < MAX_PLAYERS; i++)

    {

    if (IsPlayerConnected(i))

    {

    SetVehicleParamsForPlayer(keycar,i,0,0);

    }

    }

    format(string, sizeof(string), "~w~Vehicle~n~~g~Unlocked");

    GameTextForPlayer(playerid, string, 4000, 3);

    CarInfo[keycar][cLock] = 0;

    OnPropUpdate();

    return 1;

    }

    else if(CarInfo[keycar][cLock] == 0)

    {

        for(new i = 0; i < MAX_PLAYERS; i++)

    {

    if (IsPlayerConnected(i))

    {

    SetVehicleParamsForPlayer(keycar,i,0,1);

    }

    }

    format(string, sizeof(string), "~w~Vehicle~n~~r~Locked");

    GameTextForPlayer(playerid, string, 4000, 3);

    CarInfo[keycar][cLock] = 1;

    OnPropUpdate();

    return 1;

    }

                    }

                    else

                    {

                        SendClientMessage(playerid, COLOR_GREY, "  You don't have a vehicle at slot 2");

                        return 1;

                    }

            }

            else if(strcmp(x_nr,"color",true) == 0)

            {

                if(PlayerInfo[playerid][pPcarkey1] == 999 && PlayerInfo[playerid][pPcarkey2] == 999)

            {

                SendClientMessage(playerid, COLOR_GREY,"  You don't have a vehicle to respray.");

                return 1;

            }

            if(GetPlayerMoney(playerid) < 1000)

            {

                SendClientMessage(playerid, COLOR_GREY,"  You don't have enough money for vehicle respray.");

                return 1;

            }

            tmp = strtok(cmdtext, idx);

            if(!strlen(tmp))

    {

    SendClientMessage(playerid, COLOR_WHITE, "USAGE: /v color [ColorOneID] [ColorTwoID]");

    return 1;

    }

    new color1;

    color1 = strval(tmp);

    if(color1 < 0 && color1 > 126)

    {

        SendClientMessage(playerid, COLOR_GREY, "  Wrong color id!");

        return 1;

    }

    tmp = strtok(cmdtext, idx);

            if(!strlen(tmp))

    {

    SendClientMessage(playerid, COLOR_WHITE, "USAGE: /v color [ColorOneID] [ColorTwoID]");

    return 1;

    }

    new color2;

    color2 = strval(tmp);

    if(color2 < 0 && color2 > 126)

    {

        SendClientMessage(playerid, COLOR_GREY, "  Wrong color id!");

        return 1;

    }

    new vehid;

    if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey1]) { vehid = PlayerInfo[playerid][pPcarkey1]; }

    else if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey2]) { vehid = PlayerInfo[playerid][pPcarkey2]; }

    else { return 1; }

            if(IsPlayerInVehicle(playerid, vehid))

            {

            CarInfo[vehid][cColorOne] = color1;

                    CarInfo[vehid][cColorTwo] = color2;

                    GivePlayerMoney(playerid, -1000);

                    GameTextForPlayer(playerid, "~w~Bill for a Paint Respray~n~~r~-$1000", 5000, 1);

                    ChangeVehicleColor(vehid, color1, color2);

                    OnPropUpdate();

    OnPlayerUpdate(playerid);

    return 1;

        }

            else

            {

                SendClientMessage(playerid, COLOR_GREY,"  You are not in your vehicle.");

                return 1;

            }

            }

            else if(strcmp(x_nr,"buy",true) == 0)

            {

                if(IsAnOwnableCar(idcar))

                {

                    if(PlayerInfo[playerid][pLevel] < 3)

        {

                        SendClientMessage(playerid, COLOR_GREY, "You need to be level 3 to buy a vehicle!");

                        return 1;

        }

        if(PlayerInfo[playerid][pPcarkey1] == 999) { }

        else if(PlayerInfo[playerid][pPcarkey2] == 999) { }

        else { SendClientMessage(playerid, COLOR_GREY, "Ai Deja 2 Masini"); return 1; }

    if(CarInfo[idcar][cOwned]==1)

    {

        SendClientMessage(playerid, COLOR_WHITE, "Cineva mai detine aceasta masina");

        return 1;

    }

    if(GetPlayerMoney(playerid) >= CarInfo[idcar][cValue])

    {

        if(PlayerInfo[playerid][pPcarkey1] == 999) { PlayerInfo[playerid][pPcarkey1] = idcar; }

        else if(PlayerInfo[playerid][pPcarkey2] == 999) { PlayerInfo[playerid][pPcarkey2] = idcar; }

        else { return 1; }

    CarInfo[idcar][cOwned] = 1;

    GetPlayerName(playerid, sendername, sizeof(sendername));

    strmid(CarInfo[idcar][cOwner], sendername, 0, strlen(sendername), 999);

    GivePlayerMoney(playerid,-CarInfo[idcar][cValue]);

    PlayerPlayMusic(playerid);

    GameTextForPlayer(playerid, "~r~~h~Congratulations~n~~y~~h~Don't forget to /v park it!", 5000, 3);

    SendClientMessage(playerid, COLOR_WHITE, "Felicitari ti-ai cumparat o noua masina!");

    SendClientMessage(playerid, COLOR_WHITE, "Scrie /vehiclehelp pentru manualul masini.");

    TogglePlayerControllable(playerid, 1);

    //SendClientMessage(playerid, COLOR_YELLOW2, "Acum poti porni motorul masinii apasand pe butonul cu care sari.");

    //gEngine[playerid] = 0;

    //engineOn[GetPlayerVehicleID(playerid)] = false;

    DateProp(playerid);

    OnPropUpdate();

    OnPlayerUpdate(playerid);

    return 1;

    }

    else

    {

        SendClientMessage(playerid, COLOR_GREY, "You don't have enough cash with you ! ");

        return 1;

    }

                }

            }

            else

            {

                SendClientMessage(playerid, COLOR_WHITE, "HINT: (/v)ehicle [name]");

                SendClientMessage(playerid, COLOR_WHITE, "Available names: park, lock(1-3), sell, sellto, color");

                return 1;

            }

        }

        return 1;

    }

  3. if(strcmp(cmd,"/fare",true)==0)
        {
            if(IsPlayerConnected(playerid))
    	    {
    	        if(PlayerInfo[playerid][pMember] == 10||PlayerInfo[playerid][pLeader] == 10|| PlayerInfo[playerid][pJob] == 14)
    			{
    				if(TransportDuty[playerid] > 0)
    				{
    				    if(TransportDuty[playerid] == 1)
    				    {
    				        TaxiDrivers -= 1;
    				    }
    				    else if(TransportDuty[playerid] == 2)
    				    {
    				        BusDrivers -= 1;
    				    }
    				    TransportDuty[playerid] = 0;
    					format(string, sizeof(string), "* You are now Off Duty and earned $%d.", TransportMoney[playerid]);
    					SendClientMessage(playerid, COLOR_WHITE, string);
    					GivePlayerMoney(playerid, TransportMoney[playerid]);
    					/*ConsumingMoney[playerid] = 1;*/ TransportValue[playerid] = 0; TransportMoney[playerid] = 0;
    					return 1;
    				}
    				new Veh = GetPlayerVehicleID(playerid);
    				if(Veh == ID MASINA || Veh == ID MASINA || Veh == ID MASINA || Veh == ID MASINA || Veh == ID MASINA || Veh == ID MASINA || Veh == ID MASINA || Veh == ID MASINA || Veh == ID MASINA || Veh == ID MASINA)
    				{
    				    if(GetPlayerState(playerid) == 2)
    				    {
    					    tmp = strtok(cmdtext, idx);
    						if(!strlen(tmp))
    						{
    							SendClientMessage(playerid, COLOR_WHITE, "USAGE: /fare [price]");
    							return 1;
    						}
    						moneys = strval(tmp);
    						if(moneys < 1 || moneys > 999) { SendClientMessage(playerid, COLOR_GREY, "   Fare price must be between $1 and $999 !"); return 1; }
    					    TaxiDrivers += 1; TransportDuty[playerid] = 1; TransportValue[playerid] = moneys;
    					    GetPlayerName(playerid,sendername,sizeof(sendername));
    	    				format(string, sizeof(string), " Taxi Driver %s is On Duty, /call 444 to call a taxi driver. Fare: $%d.", sendername, TransportValue[playerid]);
    	    				OOCNews(0x00FD00FF,string);
    					}
    					else
    					{
    					    SendClientMessage(playerid, COLOR_GREY, "   You are not the Driver !");
    					    return 1;
    					}
    				}
    				else if(Veh == ID MASINA || Veh == ID MASINA)
    				{
    				    if(GetPlayerState(playerid) == 2)
    				    {
    					    tmp = strtok(cmdtext, idx);
    						if(!strlen(tmp))
    						{
    							SendClientMessage(playerid, COLOR_WHITE, "USAGE: /fare [price]");
    							return 1;
    						}
    						moneys = strval(tmp);
    						if(moneys < 1 || moneys > 99999) { SendClientMessage(playerid, COLOR_GREY, "   Fare price must be between $1 and $99999 !"); return 1; }
    					    BusDrivers += 1; TransportDuty[playerid] = 2; TransportValue[playerid]= moneys;
    					    GetPlayerName(playerid,sendername,sizeof(sendername));
    	    				format(string, sizeof(string), "Bus Driver %s is On Duty, fare: $%d.", sendername, TransportValue[playerid]);
    	    				OOCNews(TEAM_GROVE_COLOR,string);
    					}
    					else
    					{
    					    SendClientMessage(playerid, COLOR_GREY, "   You are not the Driver !");
    					    return 1;
    					}
    				}
    				else
    				{
    				    SendClientMessage(playerid, COLOR_GREY, "   You are not in a Taxi / Bus !");
    				}
    			}
    			else
    			{
    			    SendClientMessage(playerid,COLOR_GREY,"   You are not a Taxi / Bus Driver !");
    			    return 1;
    			}
    	    }
    	    return 1;
     	} 
    ** ID MASINA = ID`ul Taxiului sau Bus`ului. PS: Trebuia sa scri la " Probleme GodFather ".

    am scris..nu imi raspunde nimeni

    aaa...deci tre sa modific acolo?

  4. Am descoperit o problema in GMul meu, nu merge comanda "/fare"

    aici este codul

    	if(strcmp(cmd,"/fare",true)==0)
        {
            if(IsPlayerConnected(playerid))
    	    {
    	        if(PlayerInfo[playerid][pJob] == 20 || PlayerInfo[playerid][pJob] == 14)
    			{
    				if(TransportDuty[playerid] > 0)
    				{
    				    if(TransportDuty[playerid] == 1)
    				    {
    				        TaxiDrivers -= 1;
    				    }
    				    else if(TransportDuty[playerid] == 2)
    				    {
    				        BusDrivers -= 1;
    				    }
    				    TransportDuty[playerid] = 0;
    					format(string, sizeof(string), "» Acuma esti OFF-Duty, si ai primit %d$.", TransportMoney[playerid]);
    					SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
    					GivePlayerMoney(playerid, TransportMoney[playerid]);
    					ConsumingMoney[playerid] = 1; TransportValue[playerid] = 0; TransportMoney[playerid] = 0;
    					return 1;
    				}
    				if(GetPlayerVehicleID(playerid) == 431)
    				{
    				    if(GetPlayerState(playerid) == 2)
    				    {
    					    tmp = strtok(cmdtext, idx);
    						if(!strlen(tmp))
    						{
    							SendClientMessage(playerid, COLOR_WHITE, "» Scrie: /fare [price]");
    							return 1;
    						}
    						moneys = strval(tmp);
    						if(moneys < 1 || moneys > 200) { SendClientMessage(playerid, COLOR_GREY, ": Tarifele sunt intre 1$ si 200$."); return 1; }
    					    TaxiDrivers += 1; TransportDuty[playerid] = 1; TransportValue[playerid] = moneys;
    					    GetPlayerName(playerid,sendername,sizeof(sendername));
    	    				format(string, sizeof(string), "» BusDrive %s este ON-Duty. Tarif: %d$.", sendername, TransportValue[playerid]);
    	    				OOCNews(TEAM_GROVE_COLOR,string);
    					}
    					else
    					{
    					    SendClientMessage(playerid, COLOR_GREY, ": Ne pare rau, nu sunteti intr-un Vehicul de la BusDrive.");
    					    return 1;
    					}
    				}
    				else if(GetPlayerVehicleID(playerid) == 420 || GetPlayerVehicleID(playerid) == 438)
    				{
    				    if(GetPlayerState(playerid) == 2)
    				    {
    					    tmp = strtok(cmdtext, idx);
    						if(!strlen(tmp))
    						{
    							SendClientMessage(playerid, COLOR_WHITE, "» Scrie: /fare [price]");
    							return 1;
    						}
    						moneys = strval(tmp);
    						if(moneys < 1 || moneys > 200) { SendClientMessage(playerid, COLOR_GREY, ": Tarifele sunt intre 1$ si 200$."); return 1; }
    					    BusDrivers += 1; TransportDuty[playerid] = 2; TransportValue[playerid]= moneys;
    					    GetPlayerName(playerid,sendername,sizeof(sendername));
    	    				format(string, sizeof(string), "» TaxiDrive %s este ON-Duty. Tarif: %d$.", sendername, TransportValue[playerid]);
    	    				OOCNews(TEAM_GROVE_COLOR,string);
    					}
    					else
    					{
    					    SendClientMessage(playerid, COLOR_GREY, ": Ne pare rau, nu sunteti intr-un Vehicul de la TaxiDrive.");
    					    return 1;
    					}
    				}
    				else
    				{
    				    SendClientMessage(playerid, COLOR_GREY, ": Ne pare rau, Dar nu sunteti intr-un Taxi sau Bus.");
    				}
    			}
    			else
    			{
    			    SendClientMessage(playerid,COLOR_GREY,": Ne pare rau, dar nu ai Job-ul BusDrive sau Taxi Drive.");
    			    return 1;
    			}
    	    }
    	    return 1;
     	}

    Imi afiseaza: "Ne pare rau, Dar nu sunteti intr-un Taxi sau Bus."

  5. Pune Disable-ul in [pawn]public OnPlayerEnterCheckpoint(playerid)[/pawn]

    [pawn]public OnPlayerEnterCheckpoint(playerid)

    {

    if(PlayerToPoint(3.0,playerid, 1481.3273,-1769.8569,18.7957))

    {

    DisablePlayerCheckpoint(playerid);

            }

    }[/pawn]

    Iti multumesc;)

    Merge

  6. if (PlayerInfo[playerid][pJob] == 0 || PlayerInfo[playerid][pBuletin] == 0)

    {

        SetPlayerCheckpoint(playerid, 1481.3273,-1769.8569,18.7957,3.0);

    SendClientMessage(playerid,COLOR_1GREEN,"Nu ai inca un buletin sau un job? Du-te la CheckPointul de pe harta");

    if(PlayerToPoint(3.0,playerid, 1481.3273,-1769.8569,18.7957))

    {

        DisablePlayerCheckpoint(playerid);

    }

      }

    Nu stiu daca este ceva gresit in el, dar cand intru in checkpoint nu se dezactiveaza...am incercat si cu OnPlayerEnterCheckpoint si cu IsPlayerInCheckpoint in al 2lea if si tot degeaba

×
×
  • 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.