Jump to content

hanako

Membru
  • Posts

    540
  • Joined

  • Last visited

  • Days Won

    20

Posts posted by hanako

  1. Salut, vei avea nevoie de un alt procesor de comenzi (YCMD/ZCMD)

     

    si in loc de if(strcmp ---) te vei folosi de:

    daca folosesti YCMD
    
    YCMD:comanda(playerid, params[], help)
    {
    	// comanda ta
    	return true;
    }
    
    daca folosesti ZCMD
    
    CMD:comanda(playerid, params[])
    {
    	// comanda ta
    	return true;
    }

     

  2. YCMD:park(playerid, params[], help) {
        if(aspam[playerid] > 0) return SCMEx(playerid, COLOR_LIGHTRED, "[Command Anti-Spam] {FFFFFF}Wait %d seconds.", aspam[playerid]);
        new car = GetPlayerVehicleID(playerid);
        if(!IsPlayerInAnyVehicle(playerid)) 
            return SCM(playerid, COLOR_ERROR, "Error: {FFFFFF}You are not in your vehicle.");
        
        if(Iter_Count(MyVehicle[playerid]) == 0) 
            return SCM(playerid, COLOR_ERROR, "Error: {FFFFFF}You do not have a personal vehicle!");
        
        if(PersonalCar(playerid) == -1) 
            return SCM(playerid, COLOR_ERROR, "Error: {FFFFFF}You are not in one of your vehicles!");
        
        if(GetPlayerState(playerid) != 2) 
            return SCM(playerid, COLOR_GREEN, "* You need to drive the car in order to use this command!");
        new idd = PersonalCar(playerid);
        new Float: vhp;
        GetVehicleHealth(car, vhp);
        if(vhp < 800) return SCM(playerid, COLOR_GREY, "You can not park the car because it has less than 800 'health'!");
        if(PlayerToPoint(150, playerid, 564.1226, -1270.0704, 17.2477)) return SCM(playerid, COLOR_ERROR, "INFO: {FFFFFF}You can not park the car near the spawn.");
        new Float:x, Float:y, Float:z, Float:a;
        saveTuning(playerid, CarInfo[idd][Spawned]);
        GetVehiclePos(car, x, y, z);
        GetVehicleZAngle(car, a);
        CarInfo[idd][cLocationx] = x;
        CarInfo[idd][cLocationy] = y;
        CarInfo[idd][cLocationz] = z;
        CarInfo[idd][cTime] = gettime()+600;
        CarInfo[idd][cAngle] = a;
        CarInfo[idd][cVirtual] = GetPlayerVirtualWorld(playerid);
    
        DestroyVehicle(car);
    
        if(strlen(CarInfo[idd][cText]) >= 3) {
            DestroyDynamicObject(nameobject[CarInfo[idd][Spawned]]);
        }
        CarInfo[idd][Spawned] = CreateVehicleEx(CarInfo[idd][cModel],CarInfo[idd][cLocationx],CarInfo[idd][cLocationy],CarInfo[idd][cLocationz],CarInfo[idd][cAngle],CarInfo[idd][cColorOne],CarInfo[idd][cColorTwo], -1, 0);
        SetVehicleVirtualWorld(CarInfo[idd][Spawned], CarInfo[idd][cVirtual]);
        attach_vip_text(idd);
        SetVehicleHealth(CarInfo[idd][Spawned], CarInfo[idd][cVip] ? 2000 : 1000);
        SetTunning(idd);
        SetVehicleNumberPlate(CarInfo[idd][Spawned], CarInfo[idd][cLicense]);
        saveCar(idd);
        VehicleOccupied[idd] = 0;
        new Float: Pos[3];
        GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
        CarInfo[idd][cLastPos][0] = Pos[0];
        CarInfo[idd][cLastPos][1] = Pos[1];
        CarInfo[idd][cLastPos][2] = Pos[2];
        return true;
    }
    
    function IsVehicleOccupied(vehicleid) return VehicleOccupied[vehicleid] != 0 ? (true) : (false);
    
    stock ShowPlayerVehicle(playerid, bool: type) {
        if(aspam[playerid] > 0) return SCMEx(playerid, COLOR_LIGHTRED, "[Command Anti-Spam] {FFFFFF}Wait %d seconds.", aspam[playerid]);
        new szTitle[2000], szDialog[2000], x = 0;
        if(Iter_Count(MyVehicle[playerid]) == 0) 
            return SCM(playerid, COLOR_LGREEN, "Error: You do not have a personal vehicle!");
        
        format(szTitle, sizeof(szTitle), "Your Vehicles {E3DE31}%d/%d", Iter_Count(MyVehicle[playerid]), GetSlots(playerid));
        strcat(szDialog, "Vehicul\tStatus\tDespawn Time\tOthers details\n");
        foreach(MyVehicle[playerid], car) {
            format(szDialog, sizeof(szDialog), "%s%s\t%s\t%s\t%s\n", szDialog, aVehicleNames[CarInfo[car][cModel]-400], CarInfo[car][Spawned] != 0 ? IsVehicleOccupied(CarInfo[car][Spawned]) ? ("{FFFF00}[occupied]") : ("{26B309}[spawned]") : ("{FF0000}[despawned]"), CheckDespawnCar(car), TotalUp(car)); 
            PlayerInfo[playerid][pCarKey][x] = car;
            x++;
        }
        ShowPlayerDialog(playerid, type ? DIALOG_STICKET : DIALOG_GARAGE, DIALOG_STYLE_TABLIST_HEADERS, szTitle, szDialog, "Ok", "Exit");
        return true;
    }
    
    
    // toata problema era ca tie nu-ti seta VehicleOcuppied pe 0.

     

  3. poti face in felul urmator,

     

    new Checkpoint[MAX_PLAYERS];
    
    
    public OnPlayerCommandText(playerid, cmdtext[])
        if (strcmp("/startmission", cmdtext, true, 10) == 0)
        {
            if(IsPlayerInRangeOfPoint(playerid, 3.0, 2333.1101,-1072.5065,1049.0234))
            {
            SetPlayerCheckpoint(playerid, -2130.9629,-2061.5767,63.3069, 3.0);
            Checkpoint[playerid] = 1;
            }
            return 1;
        }
    
    public OnPlayerEnterCheckpoint(playerid)
    {
        if(Checkpoint[playerid] == 1) // 
        {
            GivePlayerMoney(playerid, 10);
            GameTextForPlayer(playerid,"~g~Mission 1 : Discover Dealership Completed!\nAnd Got +10$",3000,4);
            DisablePlayerCheckpoint(playerid);
            SetPlayerCheckpoint(playerid, coordonatele tale, size);
            Checkpoint[playerid]++;
        }
        if(Checkpoint[playerid] == 2)
        {
        	continui comanda de aici.
        }
        return true;
    }

     

  4. E:\HGame RPG\gamemodes\Ding.pwn(21135) : error 017: undefined symbol "pVip"

    trebuie să te duci la enum-ul tău de Player și să adaugi  pVip, apoi să-i faci incarcarea in baza de date și să-i setezi pVip pe 1 cand cumpara vip

    E:\HGame RPG\gamemodes\Ding.pwn(21151) : warning 217: loose indentation

    codul tău nu e așezat corect în gamemode

    E:\HGame RPG\gamemodes\Ding.pwn(56540) : warning 203: symbol is never used: "logina"

    ”logina” nu este utilizat deloc

     

  5. in primul rând, după ce te înregistrezi ar trebui să ai SetPlayerSkin(playerid, skinid); si aici sa-ti pui id-ul de la skin-ul tau

    si ar trebui sa mai ai o salvare in baza de date, unde sa-i salveze skin-ul, acolo vezi sa ii setezi skin-ul cu id-ul tau

    daca nu ai inteles, adauga-ma pe discord hanako#5798

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