SA-MP 0.3c client/server, noua versiune
#1

SA-MP 0.3c

In aceasta noua versiune s-au rezolvat o multime de buguri si au aparut cateva update-uri importante.


Informatii importante pentru a trece un script de 0.3b pe 0.3c

Functiile SetPlayerHoldingObject, IsPlayerHoldingObject si StopPlayerHoldingObject au fost scoase. Acestea au fost scoase pentru ca , cu ajutorul lor puteai atasa doar un singur obiect fiecarui jucator. Cu noile functii se pot atasa cate 5 obiecte fiecarui jucator.

pawn Code:
#define MAX_PLAYER_ATTACHED_OBJECTS 5 // Numarul obiectelor atasate valabile ie 5 = 0-4

native SetPlayerAttachedObject(playerid, index, modelid, bone, Float:fOffsetX = 0.0, Float:fOffsetY = 0.0, Float:fOffsetZ = 0.0, Float:fRotX = 0.0, Float:fRotY = 0.0, Float:fRotZ = 0.0, Float:fScaleX = 1.0, Float:fScaleY = 1.0, Float:fScaleZ = 1.0);
native RemovePlayerAttachedObject(playerid, index);
native IsPlayerAttachedObjectSlotUsed(playerid, index);
You can add them to the top of your pwn file after a_samp.inc is included. These will use player attached object slot number 4.

pawn Code:
#define SetPlayerHoldingObject(%1,%2,%3,%4,%5,%6,%7,%8,%9) SetPlayerAttachedObject(%1,MAX_PLAYER_ATTACHED_OBJECTS-1,%2,%3,%4,%5,%6,%7,%8,%9)
#define StopPlayerHoldingObject(%1) RemovePlayerAttachedObject(%1,MAX_PLAYER_ATTACHED_OBJECTS-1)
#define IsPlayerHoldingObject(%1) IsPlayerAttachedObjectSlotUsed(%1,MAX_PLAYER_ATTACHED_OBJECTS-1);
Colour embedding:

Poti folosi {RRGGBB} (hex) strings embedded in schimbarea culorii textului. Acesta merge in chat , dialog box si placutele de inmatriculare. Codul culorii este automat inlocuit cu () in chatul fiecarui jucator.
Intoarcerea functiei SetVehicleNumberplate()

Toate masinile au o placuta generica "XYZR 000". Numarul placutei de inmatriculare se va schimba DOAR daca SetVehicleNumberPlate() este folosit. Pe placuta incap 32 de caractere (cu tot cu codurile pentru culori)Cei din echipa sa-mp va roaga sa folositi cu grija aceasta functie si sa nu o atribuiti vehiculelor ce nu folosesc placute de inmatriculare (gen avioane/barci etc).

SetVehicleParamsEx()

Noi parametrii pentru vehicule ce te lasa sa schimbi starea motorului, farurilor, alarmei, incuietorile usilor portbagaj inchis/deschis, capota inchisa/deschisa.
Acestea nu trebuiesc atribuite fiecarui jucator ca in functia SetVehicleParamsForPlayer(). Sunt automat folosite pentru toti jucatorii.

pawn Code:
#define VEHICLE_PARAMS_UNSET    -1
#define VEHICLE_PARAMS_OFF  0
#define VEHICLE_PARAMS_ON   1

native SetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);
native GetVehicleParamsEx(vehicleid, &engine, &lights, &alarm, &doors, &bonnet, &boot, &objective);
Exemplu de comanda:

pawn Code:
new engine,lights,alarm,doors,bonnet,boot,objective;

    if(strcmp(cmd, "/startengine",true) == 0) {
        new vid = GetPlayerVehicleID(playerid);
        if(vid != INVALID_VEHICLE_ID) {
            GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
            SetVehicleParamsEx(vid,VEHICLE_PARAMS_ON,lights,alarm,doors,bonnet,boot,objective);
        }
        return 1;
    }
    if(strcmp(cmd, "/stopengine",true) == 0) {
        new vid = GetPlayerVehicleID(playerid);
        if(vid != INVALID_VEHICLE_ID) {
            GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
            SetVehicleParamsEx(vid,VEHICLE_PARAMS_OFF,lights,alarm,doors,bonnet,boot,objective);
        }
        return 1;
    }
De asemenea poti folosi si alte functii in jurul acestei functii eg.

pawn Code:
SetVehicleEngineOn(vehicleid)
{  
        new engine,lights,alarm,doors,bonnet,boot,objective;
        GetVehicleParamsEx(vehicleid,engine,lights,alarm,doors,bonnet,boot,objective);
        SetVehicleParamsEx(vehicleid,VEHICLE_PARAMS_ON,lights,alarm,doors,bonnet,boot,objective);
}
ManualVehicleEngineAndLights()

ManualVehicleEngineAndLights() poate fi folosit in OnGameModeInit(), sau undeva cand jucatorul se conecteaza.

AttachObjectToVehicle

Atasare de obiecte pe vehicule.

New objects, particle objects, samp.img, samp.ide

Sunt multe update-uri legate de acest subiect , in curand va aparea pe http://wiki.sa-mp.com un tutorial complet referitor la cum se folosesc aceste lucruri noi. O lista intreaga de noi obiecte ce au fost adaugate in sa-mp o puteti gasi in folderul GTA SA la models\samp.ide dupa ce instalezi o versiune de SA-MP 0.3c.

C://Program Files/Rockstar Games/GTA San Andreas/models/samp.ide

SA-MP 0.3c client/server
- Link-urile de download pe pagina principala. 0.3c este oficial, cea mai noua versiune SA-MP.

*Sursa: Forumul Oficial SA-MP

Am tradus pentru voi.
Reply


Messages In This Thread
SA-MP 0.3c client/server, noua versiune - by TheGuardianAngel - 28.11.2010, 14:45
Re: Sa-MP 0.3c RC (Released) RC1 - by Mihai_Marius - 28.11.2010, 16:45
Re: Sa-MP 0.3c RC (Released) RC1 - by [NoV]LaZ - 28.11.2010, 16:47
Re: Sa-MP 0.3c RC (Released) RC1 - by IstuntmanI - 28.11.2010, 17:48
Re: Sa-MP 0.3c RC (Released) RC1 - by TheGuardianAngel - 28.11.2010, 19:40
Re: Sa-MP 0.3c RC (Released) RC1 - by DSK_Vyorel - 29.11.2010, 00:36
Re: Sa-MP 0.3c RC (Released) RC1 - by eXtr1kE - 30.11.2010, 14:32
Re: Sa-MP 0.3c RC (Released) RC1 - by Zh3r0 - 30.11.2010, 15:13
Re: Sa-MP 0.3c RC (Released) RC2 - by Cyp$1ooo$$ - 30.11.2010, 19:57
Re: Sa-MP 0.3c RC (Released) RC1 - by eXtr1kE - 01.12.2010, 08:19
Re: Sa-MP 0.3c RC (Released) RC2 - by [aKa]sEnZaTzIE - 04.12.2010, 14:01
Re: Sa-MP 0.3c RC (Released) RC2 - by [NoV]LaZ - 04.12.2010, 14:25
Re: Sa-MP 0.3c RC (Released) RC2 - by [aKa]sEnZaTzIE - 04.12.2010, 15:26
Re: Sa-MP 0.3c RC (Released) RC3 - by Mihai_Marius - 04.12.2010, 15:53
Re: Sa-MP 0.3c RC (Released) RC4-2 - by [NoV]LaZ - 10.12.2010, 15:33
Re: Sa-MP 0.3c RC (Released) RC4-2 - by LighT. - 11.12.2010, 17:56
Re: Sa-MP 0.3c RC (Released) RC4-2 - by XtremE12 - 15.12.2010, 07:34
Re: Sa-MP 0.3c RC (Released) RC4-2 - by Stefan_Toretto - 15.12.2010, 20:00
Re: Sa-MP 0.3c client/server (RC5) - by [NoV]LaZ - 17.12.2010, 23:14
Re: SA-MP 0.3c client/server (RC5) - by Stefan_Toretto - 18.12.2010, 18:37

Forum Jump:


Users browsing this thread: 5 Guest(s)