Jump to content

gabbii

Membru
  • Posts

    150
  • Joined

  • Last visited

    Never

Posts posted by gabbii


  1. new bool:Engine[ MAX_VEHICLES ];

    dcmd(engine, 6, cmdtext);

    dcmd_engine(playerid, params[ ]) {
    #pragma unused params
    new vid = GetPlayerVehicleID(playerid);
    new engine,lights,alarm,doors,bonnet,boot,objective;
    GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
    if(IsPlayerInAnyVehicle(playerid)) {
        if( !Engine[vid] ) {
    if(IsABBike(vid)) return SendClientMessage(playerid, COLOR_GRAD2, "This bike doesen't have engine!");
        SetVehicleParamsEx(vid, VEHICLE_PARAMS_ON, lights, alarm, doors, bonnet, boot, objective);
    Engine[vid] = true;
        return true;
    }
      else {
    if(IsABBike(vid)) return SendClientMessage(playerid, COLOR_GRAD2, "This bike doesen't have engine!");
        SetVehicleParamsEx(vid, VEHICLE_PARAMS_OFF, lights, alarm, doors, bonnet, boot, objective);
        Engine[vid] = false;
        return true;
    }
    }
      return true;
    }

    nu merge da io nu folosesc dcmd.....
  2. Am facut aceasta comanda pentru a porni motorul la masina si al opri utilizand comanda /engine, da nu merge de loc de la ce poate fi?

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

    {

            new vid = GetPlayerVehicleID(playerid);

            if(vid != INVALID_VEHICLE_ID)

    {

                if(IsABBike(vid)) return SendClientMessage(playerid, COLOR_GRAD2, "This bike doesen't have engine!");

                GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);

    //                                ||||||

                SetVehicleParamsEx(vid,VEHICLE_PARAMS_ON,lights,alarm,doors,bonnet,boot,objective);

            }

            else

            {

                if(IsABBike(vid)) return SendClientMessage(playerid, COLOR_GRAD2, "This bike doesen't have engine!");

                GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);

    //                                ||||||

                SetVehicleParamsEx(vid,VEHICLE_PARAMS_OFF,lights,alarm,doors,bonnet,boot,objective);

    //Here the VEHICLE_PARAMS_OFF will turn off your engine.

            }

            return 1;

        }[/pawn]

  3. posteazane comanda... si te vom ajuta.

    EDIT: uite comanda si sa schimbi coordonatele...

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

    {

        if(IsPlayerConnected(playerid))

        {

            if(IsPlayerInRangeOfPoint(playerid, 7.0, coordonatele x,coordonatele y,coordonatele z))

            {

                if(PlayerDrunk[playerid] < 10)

                {

                    new Float:health;

                    new x_nr[256];

    x_nr = strtok(cmdtext, idx);

    if(!strlen(x_nr)) {

    SendClientMessage(playerid, COLOR_YELLOW, "|__________________ Bar Drinks __________________|");

    SendClientMessage(playerid, COLOR_2RED, "USAGE: /drink [drinkname]");

      SendClientMessage(playerid, COLOR_BLUE, "Available names: Bere ($6), Vodka ($10), Whiskey ($10), Apa ($2), Pepsi($2)");

    SendClientMessage(playerid, COLOR_YELLOW, "|________________________________________________|");

    return 1;

    }

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

    {

    if(PlayerInfo[playerid]


    < 12)

    {

        SendClientMessage(playerid, COLOR_2RED, "Barman: Scuze,dar trebuie sa ai cel putin 12 ani sa poti sa bei Bere!");

        return 1;

    }

        GivePlayerMoneyEx(playerid, - 6);

        SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DRINK_BEER);

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

        format(string, sizeof(string), "* %s a baut o bere rece.", sendername);

        ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);

        PlayerDrunk[playerid] += 1;

    }

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

    {

        if(PlayerInfo[playerid]


    < 13)

    {

        SendClientMessage(playerid, COLOR_2RED, "Barman: Scuze,dar trebuie sa ai cel putin 13 ani sa poti sa bei Vodka!");

        return 1;

    }

        GivePlayerMoneyEx(playerid, - 10);

        PlayerDrunk[playerid] += 2;

                            SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DRINK_BEER);

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

            format(string, sizeof(string), "* %s a baut o vodka.", sendername);

        ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);

    }

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

    {

        if(PlayerInfo[playerid]


    < 13)

    {

        SendClientMessage(playerid, COLOR_2RED, "Barman: Scuze,dar trebuie sa ai cel putin 13 ani sa poti sa bei Whiskey!");

        return 1;

    }

        GivePlayerMoneyEx(playerid, - 10);

        PlayerDrunk[playerid] += 3;

        SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DRINK_BEER);

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

        format(string, sizeof(string), "* %s a baut un whiskey.", sendername);

        ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);

    }

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

    {

        GivePlayerMoneyEx(playerid, - 2);

        SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DRINK_SPRUNK);

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

        format(string, sizeof(string), "* %s a baut o apa borsec rece.", sendername);

        ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);

        if(GetPlayerHealth(playerid, health) < 100)

    {

        if(PlayerInfo[playerid][pAlcoholPerk] > 0) { new hp = 2 * PlayerInfo[playerid][pAlcoholPerk]; hp += 5; SetPlayerHealth(playerid, health + hp); }

    else { SetPlayerHealth(playerid, health + 5.0); }

    }

    }

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

    {

        GivePlayerMoneyEx(playerid, - 2);

        SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DRINK_SPRUNK);

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

        format(string, sizeof(string), "* %s a baut un pepsi rece.", sendername);

        ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);

        if(GetPlayerHealth(playerid, health) < 100)

    {

        if(PlayerInfo[playerid][pAlcoholPerk] > 0) { new hp = 2 * PlayerInfo[playerid][pAlcoholPerk]; hp += 5; SetPlayerHealth(playerid, health + hp); }

    else { SetPlayerHealth(playerid, health + 5.0); }

    }

    }

    else

    {

        SendClientMessage(playerid, COLOR_2RED, "Barman: Nu cunosc nici o bautura cu acest nume.");

        return 1;

    }

                }

                else

                {

                    SendClientMessage(playerid, COLOR_2RED, "Nu mai poti sa bei mult, vei intra in COMA ALCOOLICA!");

                    return 1;

                }

            }

            else

            {

                SendClientMessage(playerid, COLOR_2RED, "Nu esti la BAR!");

                return 1;

            }

        }

        return 1;

    }[/pawn]

  4. Bun,am un gamemode la care am intampiant niste probleme.Prima problema a fost ca nu mergea nicio comanda,dar s-a dovedit a fi din cauza zmcd si am reusit sa rezolv stergando cu //#include <zcmd>

    A doua problema ar fi ca nu se salveaza conturile.Imi fac cont acum si cand reintru pe server trebuie sa completez iar stilu de mers,de box si sa fac tutorialul,DAR ramane fiserul de format se formeaza in scriptfiles si chiar si adminu daca il pun ramane.care ar fi solutia?

    Creaza in scriptfiles un dosar numit "Users".
  5. salut , cum pot face un dialog , in care , fiecare player care nu are cont pe server sa scrie acolo adresa de e-mail , si sa se salveze intr-un fisier in scriptfiles ? dar sa apara doar la cei care nu au completato :D

    exista vre-un FS cu asa ceva , sau ma pote ajuta cineva ?

    Tu vrei sa faci ca la b-zone?
  6. 1: ai acelas interior cu alt cluckin bell.

    2: Creaza in scriptfiles un folder numit Users.

    3: Nu stiu rezolvare la problema aia si no sa ai niciodata un server bun daca il iei dp net:), cel mai bun server e ala facut de tine de la 0 ;).

    EDIT: la 1 foloseste if(GetPlayerVirtualWorld(playerid) == 1) .

  7. KobRa" post="85187" timestamp="1310768599"]

    Simplu

    Intri in GM

    cauti:

    public OnPlayerText(playerid, text[])

    si dedesubt pui

    SetPlayerChatBubble(playerid, text, 0xFF0000FF, 100.0, 10000);

    :wink:

    merci:x

  8. cum as putea sa fac /engine sa aprind motorul si sa il sting tot cu /engine, as mai vrea sa scot cand aprind motorul pe tasta 2 si la lumini sa le aprind pe litera L si sa le sting tot pe litera L?

    	}
        if(strcmp(cmd, "/engine",true) == 0) {
            new vid = GetPlayerVehicleID(playerid);
            if(vid != INVALID_VEHICLE_ID) {
                if(IsABBike(vid)) return SendClientMessage(playerid, COLOR_GRAD2, "This bike doesen't have engine!");
                GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
    //                                 ||||||
                SetVehicleParamsEx(vid,VEHICLE_PARAMS_ON,lights,alarm,doors,bonnet,boot,objective);
    //VEHICLE_PARAMS_ON is used to start the engine,it purely replace the engine thing!
            }
            return 1;
        }
        if(strcmp(cmd, "/stopengine",true) == 0) {
            new vid = GetPlayerVehicleID(playerid);
            if(vid != INVALID_VEHICLE_ID) {
                if(IsABBike(vid)) return SendClientMessage(playerid, COLOR_GRAD2, "This bike doesen't have engine!");
                GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
    //                                 ||||||
                SetVehicleParamsEx(vid,VEHICLE_PARAMS_OFF,lights,alarm,doors,bonnet,boot,objective);
    //Here the VEHICLE_PARAMS_OFF will turn off your engine.
            }
            return 1;
        }
        if(strcmp(cmd, "/lightson",true) == 0) {
            new vid = GetPlayerVehicleID(playerid);
            if(vid != INVALID_VEHICLE_ID) {
                GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
    //                                        ||||||
                SetVehicleParamsEx(vid,engine,VEHICLE_PARAMS_ON,alarm,doors,bonnet,boot,objective);
    //VEHICLE_PARAMS_ON is used to turn onn the lights.
            }
            return 1;
        }
        if(strcmp(cmd, "/lightsoff",true) == 0) {
            new vid = GetPlayerVehicleID(playerid);
            if(vid != INVALID_VEHICLE_ID) {
                GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
    //                                        ||||||
                SetVehicleParamsEx(vid,engine,VEHICLE_PARAMS_OFF,alarm,doors,bonnet,boot,objective);
    //Here the VEHICLE_PARAMS_OFF will turn off your lights.
            }
            return 1;
        }
    

  9. Acum imi da erorile astea ....

    D:\Internet\Server Sa-Mp\samp03csvr_R2-2_win32\gamemodes\eGammer.pwn(44527) : error 017: undefined symbol "vid"
    D:\Internet\Server Sa-Mp\samp03csvr_R2-2_win32\gamemodes\eGammer.pwn(44527) : error 001: expected token: ")", but found ";"
    D:\Internet\Server Sa-Mp\samp03csvr_R2-2_win32\gamemodes\eGammer.pwn(44527) : error 036: empty statement
    D:\Internet\Server Sa-Mp\samp03csvr_R2-2_win32\gamemodes\eGammer.pwn(44527) : 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.

  10. mia dat error

    D:\Internet\Server Sa-Mp\samp03csvr_R2-2_win32\gamemodes\eGammer.pwn(2964) : error 004: function "GivePlayerCash" is not implemented
    D:\Internet\Server Sa-Mp\samp03csvr_R2-2_win32\gamemodes\eGammer.pwn(2993) : error 004: function "GivePlayerCash" is not implemented
    D:\Internet\Server Sa-Mp\samp03csvr_R2-2_win32\gamemodes\eGammer.pwn(3029) : error 004: function "SafeResetPlayerWeapons" is not implemented
    D:\Internet\Server Sa-Mp\samp03csvr_R2-2_win32\gamemodes\eGammer.pwn(3030) : error 004: function "SafeGivePlayerWeapon" is not implemented
    D:\Internet\Server Sa-Mp\samp03csvr_R2-2_win32\gamemodes\eGammer.pwn(3057) : error 004: function "SafeResetPlayerWeapons" is not implemented
    D:\Internet\Server Sa-Mp\samp03csvr_R2-2_win32\gamemodes\eGammer.pwn(3580) : error 004: function "PlayerToPoint" is not implemented
    D:\Internet\Server Sa-Mp\samp03csvr_R2-2_win32\gamemodes\eGammer.pwn(3592) : error 004: function "PlayerToPoint" is not implemented
    D:\Internet\Server Sa-Mp\samp03csvr_R2-2_win32\gamemodes\eGammer.pwn(3604) : error 004: function "PlayerToPoint" is not implemented
    D:\Internet\Server Sa-Mp\samp03csvr_R2-2_win32\gamemodes\eGammer.pwn(3616) : error 004: function "PlayerToPoint" is not implemented
    D:\Internet\Server Sa-Mp\samp03csvr_R2-2_win32\gamemodes\eGammer.pwn(3620) : error 004: function "PlayerToPoint" is not implemented
    D:\Internet\Server Sa-Mp\samp03csvr_R2-2_win32\gamemodes\eGammer.pwn(3632) : error 004: function "PlayerToPoint" is not implemented
    D:\Internet\Server Sa-Mp\samp03csvr_R2-2_win32\gamemodes\eGammer.pwn(3636) : error 004: function "PlayerToPoint" is not implemented
    D:\Internet\Server Sa-Mp\samp03csvr_R2-2_win32\gamemodes\eGammer.pwn(3640) : error 004: function "PlayerToPoint" is not implemented
    D:\Internet\Server Sa-Mp\samp03csvr_R2-2_win32\gamemodes\eGammer.pwn(3644) : error 004: function "PlayerToPoint" is not implemented
    D:\Internet\Server Sa-Mp\samp03csvr_R2-2_win32\gamemodes\eGammer.pwn(3648) : error 004: function "PlayerToPoint" is not implemented
    D:\Internet\Server Sa-Mp\samp03csvr_R2-2_win32\gamemodes\eGammer.pwn(3652) : error 004: function "PlayerToPoint" is not implemented
    D:\Internet\Server Sa-Mp\samp03csvr_R2-2_win32\gamemodes\eGammer.pwn(3656) : error 004: function "PlayerToPoint" is not implemented
    D:\Internet\Server Sa-Mp\samp03csvr_R2-2_win32\gamemodes\eGammer.pwn(3660) : error 004: function "PlayerToPoint" is not implemented
    D:\Internet\Server Sa-Mp\samp03csvr_R2-2_win32\gamemodes\eGammer.pwn(3672) : error 004: function "PlayerToPoint" is not implemented
    D:\Internet\Server Sa-Mp\samp03csvr_R2-2_win32\gamemodes\eGammer.pwn(3676) : error 004: function "PlayerToPoint" is not implemented
    D:\Internet\Server Sa-Mp\samp03csvr_R2-2_win32\gamemodes\eGammer.pwn(3680) : error 004: function "PlayerToPoint" is not implemented
    D:\Internet\Server Sa-Mp\samp03csvr_R2-2_win32\gamemodes\eGammer.pwn(3684) : error 004: function "PlayerToPoint" is not implemented
    D:\Internet\Server Sa-Mp\samp03csvr_R2-2_win32\gamemodes\eGammer.pwn(3688) : error 004: function "PlayerToPoint" is not implemented
    D:\Internet\Server Sa-Mp\samp03csvr_R2-2_win32\gamemodes\eGammer.pwn(3700) : error 004: function "PlayerToPoint" is not implemented
    D:\Internet\Server Sa-Mp\samp03csvr_R2-2_win32\gamemodes\eGammer.pwn(3704) : error 004: function "PlayerToPoint" is not implemented
    D:\Internet\Server Sa-Mp\samp03csvr_R2-2_win32\gamemodes\eGammer.pwn(3708) : error 004: function "PlayerToPoint" is not implemented
    
    Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright (c) 1997-2006, ITB CompuPhase
    
    
    26 Errors.
    

  11. cum pot face cand scri/fill sa nu bage benzina cand motoru e pornit?

    /engine si /stopengine

    }    
    if(strcmp(cmd, "/engine",true) == 0) {
            new vid = GetPlayerVehicleID(playerid);
            if(vid != INVALID_VEHICLE_ID) {
                if(IsABBike(vid)) return SendClientMessage(playerid, COLOR_GRAD2, "This bike doesen't have engine!");
                GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
    //                                 ||||||
                SetVehicleParamsEx(vid,VEHICLE_PARAMS_ON,lights,alarm,doors,bonnet,boot,objective);
    //VEHICLE_PARAMS_ON is used to start the engine,it purely replace the engine thing!
            }
            return 1;
    [code]    }
        if(strcmp(cmd, "/stopengine",true) == 0) {
            new vid = GetPlayerVehicleID(playerid);
            if(vid != INVALID_VEHICLE_ID) {
                if(IsABBike(vid)) return SendClientMessage(playerid, COLOR_GRAD2, "This bike doesen't have engine!");
                GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
    //                                 ||||||
                SetVehicleParamsEx(vid,VEHICLE_PARAMS_OFF,lights,alarm,doors,bonnet,boot,objective);
    //Here the VEHICLE_PARAMS_OFF will turn off your engine.
            }
            return 1;
        }
    si /fill
    	}
    	if(strcmp(cmd, "/fill", true) == 0)
    	{
    	    if(IsPlayerConnected(playerid))
    	    {
    			if(IsAtGasStation(playerid))
    			{
    			    if(Gas[idcar] <= 99)
    			    {
    			    	TogglePlayerControllable(playerid, 0);
    			    	GameTextForPlayer(playerid,"~w~~n~~n~~n~~n~~n~~n~~n~~n~~n~Re-Fueling Vehicle, please wait",2000,3);
    					SetTimer("Fillup",RefuelWait,0);
    					Refueling[playerid] = 1;
    				}
    				else
    				{
    				    GameTextForPlayer(playerid,"~r~~n~~n~~n~~n~~n~~n~~n~~n~~n~Gas can is full",2000,3);
    				}
    			}
    			else
    			{
    				SendClientMessage(playerid,COLOR_GREY,"   You're not at a Gas Station!");
    			}
    		}
        	return 1;
    	}

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