PauLL Posted October 8, 2013 Report Share Posted October 8, 2013 Am facut attach object to vehicle EXACT ca in tutorialul lui gireada ,arata masina da rnu arata obiectul atasat.Ce sa fac?[pawn]obiectsultan = CreateObject(19310, 0.0, 0.0, 0.0, 0.00000, 0.00000, 0.0); AttachObjectToVehicle(obiectsultan,TAXI4, 0.01334, -0.71075, 0.92159, 0.00000, 0.00000, -91.14000);[/pawn]am pus sus cu new ... etc nu imi da NICIO eroare dar nu se vede obiectul. Link to comment Share on other sites More sharing options...
[XSR]NexT Posted October 9, 2013 Report Share Posted October 9, 2013 Unde ai pus codurile astea? Link to comment Share on other sites More sharing options...
Ph0eniX Posted October 9, 2013 Report Share Posted October 9, 2013 Eu o sa iti dau un exemplu de FS , daca vrei sa il urmezi foarte bine merge bagat si direct in GM stii tu sa modifici ( cred)Prima oara include-urile (eu folosesc doar ZCMD , deci iti dau exemplu pe ZCMD)#include <a_samp> #include <zcmd> Acuma defines #define COLOR_ORANGE 0xFF9900AA #define COLOR_RED 0xFF0000AA #define Car_Owner1 "[PhX]Exc1siOn[PhX]" Unde "[PhX]Exc1siOn[PhX]" este numele Ownerului masinii News new exc1veh, OnFilterScriptInit (daca vrei sa fie ca FS ) OnGameModeInit (daca vrei sa fie in GM) Eu o sa iti scriu cu FilterScript public OnFilterScriptInit() { //-------------------------------------------------------------------------- LoadCar1(); //-------------------------------------------------------------------------- return 1; } Commands MyCar , sa iti teleporteze la tine masinile la care esti owner:) CMD:mycar(playerid, params[]) { if(strcmp(pName(playerid), Car_Owner1, true) == 0) { if(!IsPlayerInAnyVehicle(playerid)) { GetPlayerPos(playerid, x,y,z); SetVehiclePos(exc1veh, x+2,y+2,z); PutPlayerInVehicle(playerid, exc1veh, 0); Success(playerid); } else ErrorMSG(playerid); } return 1; } public OnPlayerStateChange //-------------------------------------------------------------------------- new vehicleid = GetPlayerVehicleID(playerid); //-------------------------------------------------------------------------- if(newstate == PLAYER_STATE_DRIVER) { if(vehicleid == exc1veh && GetVehicleModel(vehicleid) == 560) { if(strcmp(pName(playerid), Car_Owner1, true) == 0 || IsPlayerAdmin(playerid)) { return 1; } else { GetPlayerPos(playerid, x,y,z); SetPlayerPos(playerid, x,y,z+5); return Errors(playerid, 1); } } } return 1; } Stocks (Stock-ul pName nu este necesar daca il vei baga in GM) stock pName(playerid) { new Name[MAX_PLAYER_NAME]; GetPlayerName(playerid, Name, 24); return Name; } //------------------------------------------------------------------------------ stock Errors(playerid, EID) { new string[90]; //-------------------------------------------------------------------------- if(EID == 1) { format(string, 90, "~w~You are not my owner~n~~r~%s", Car_Owner1); } return GameTextForPlayer(playerid, string, 5000, 4); } //------------------------------------------------------------------------------ stock Success(playerid) { return SendClientMessage(playerid, COLOR_ORANGE, "You have Succesfully spawned your Personal Car!"); } //------------------------------------------------------------------------------ stock ErrorMSG(playerid) { return SendClientMessage(playerid, COLOR_RED, "ERROR: You allready have a vehicle!"); } //------------------------------------------------------------------------------ stock LoadCar1() { //-------------------------------------------------------------------------- new obiectsultan; //========================================================================== SetVehicleNumberPlate(exc1veh, "{FF0000}[PhX]"); //Modifici [PhX] cu ce vrei tu sa apara la masina ta (number plate) exc1veh = AddStaticVehicle(560,200.4643,-2604.0471,6.9274,5.5493,0,0); // dupa 560, sunt coordonatele unde sa fie masina modifici tu dupa bunul plac:) SetVehicleNumberPlate(exc1veh, "{FF0000}[PhX]"); // Modifici [PhX] cu ce vrei tu sa apara la masina ta (number plate) //-------------------------------------------------------------------------- obiectsultan = CreateObject(19310, 0.0, 0.0, 0.0, 0.00000, 0.00000, 0.0); //-------------------------------------------------------------------------- AttachObjectToVehicle(obiectsultan, exc1veh, 0.01334, -0.71075, 0.92159, 0.00000, 0.00000, -91.14000); //-------------------------------------------------------------------------- }Daca nu ai inteles ceva , o functie sau ceva , lasa reply te voi ajuta Succes public OnPlayerConnect(playerid) { print("[ERROR] - Unable to establish a connection with the world..."); SendRconCommand("exit"); return 1; } Link to comment Share on other sites More sharing options...
PauLL Posted October 9, 2013 Author Report Share Posted October 9, 2013 phoenix cred ca esti pe alta lungime de unda.iar next,odurile le-am pus la ongamemode init. Link to comment Share on other sites More sharing options...
Ph0eniX Posted October 9, 2013 Report Share Posted October 9, 2013 yo tiam facut direct tot da daca nu intelegi ce sati fac incearcal intrun FS sa vezi ca merge public OnPlayerConnect(playerid) { print("[ERROR] - Unable to establish a connection with the world..."); SendRconCommand("exit"); return 1; } Link to comment Share on other sites More sharing options...
PauLL Posted October 9, 2013 Author Report Share Posted October 9, 2013 in ce mi-ai dat acolo nu vad niciun attachobjecttovehicle Link to comment Share on other sites More sharing options...
Ph0eniX Posted October 9, 2013 Report Share Posted October 9, 2013 Uitete mai clar , inainte de a vorbi UITETE LA TOT dai in jos si vei vedea ca la STOCKS ESTE in fine laso balta daca nu stii nici macar sa te uiti ce sa mai vorbesc de adaugat...eu miam facut treaba de a ajuta restu...depinde de u:P public OnPlayerConnect(playerid) { print("[ERROR] - Unable to establish a connection with the world..."); SendRconCommand("exit"); return 1; } Link to comment Share on other sites More sharing options...
PauLL Posted October 9, 2013 Author Report Share Posted October 9, 2013 Man,la ce am postat eu,e ceva gresit?DA SAU NU,nu imi da fs-uri aici :|il astept pe gireada sau next ei macar stiu ce vorbesc. Link to comment Share on other sites More sharing options...
Ph0eniX Posted October 9, 2013 Report Share Posted October 9, 2013 AtachObject nu se pune la OnGameModeInit ai sa vezi ca si eu or sati spuna la fel :) public OnPlayerConnect(playerid) { print("[ERROR] - Unable to establish a connection with the world..."); SendRconCommand("exit"); return 1; } Link to comment Share on other sites More sharing options...
PauLL Posted October 9, 2013 Author Report Share Posted October 9, 2013 PAI ZI UNDE SE PUNE :| Link to comment Share on other sites More sharing options...
Question
PauLL
Am facut attach object to vehicle EXACT ca in tutorialul lui gireada ,arata masina da rnu arata obiectul atasat.Ce sa fac?
[pawn]obiectsultan = CreateObject(19310, 0.0, 0.0, 0.0, 0.00000, 0.00000, 0.0);
AttachObjectToVehicle(obiectsultan,TAXI4, 0.01334, -0.71075, 0.92159, 0.00000, 0.00000, -91.14000);[/pawn]
am pus sus cu new ... etc nu imi da NICIO eroare dar nu se vede obiectul.
Link to comment
Share on other sites
9 answers to this question
Recommended Posts