Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- ********************************************************************************
- JohnnyYz Personal Car
- Credits: JohnnyYz
- Helper : Sa-mp.com ; Sa-mp.ro
- Contact: Y/m : xt3z0ne / Skype : xt3z0ne123
- ~Info~
- Daca modifici creditele atunci sa iti fut morti ma-tii!!!
- ********************************************************************************
- */
- #include "a_samp"
- #include " zcmd "
- //==============================================================================
- // Color Info
- //==============================================================================
- #define COLOR_ORANGE 0xFF9900AA
- #define COLOR_RED 0xFF0000AA
- #define COLOR_GREEN 0x66ff00
- #define COLOR_BLUE 0x00b3ff
- //==============================================================================
- // Car Info Proprietar
- //==============================================================================
- #define Car_Personal "JohnnyYz"
- //==============================================================================
- // Car Info New Variables
- //==============================================================================
- new
- jcar, Float:x,
- Float:y, Float:z;
- //==============================================================================
- // Car Info Script Loading
- //==============================================================================
- public OnFilterScriptInit()
- {
- print("\n");
- print("========================================");
- print("+-- JohnnyYz Personal Car --+");
- print("========================================");
- print("\n");
- //================
- LoadingJcar();
- //================
- return 1;
- }
- //==============================================================================
- // Car Info Commands
- //==============================================================================
- CMD:mycar(playerid, params[])
- {
- if(strcmp(pName(playerid), Car_Personal, true) == 0)
- {
- if(!IsPlayerInAnyVehicle(playerid))
- {
- GetPlayerPos(playerid, x,y,z); SetVehiclePos(jcar, x+2,y+2,z);
- PutPlayerInVehicle(playerid, jcar, 0); LoadingSuccess( playerid ) ;
- }
- else allready(playerid);
- }
- return 1;
- }
- //==============================================================================
- // Car Info StateChange
- //==============================================================================
- public OnPlayerStateChange(playerid, newstate, oldstate)
- {
- //================
- new vehicleid = GetPlayerVehicleID(playerid);
- //================
- if(newstate == PLAYER_STATE_DRIVER)
- {
- if(vehicleid == jcar && GetVehicleModel(vehicleid) == 411)
- {
- if(strcmp(pName(playerid), Car_Personal, true) == 0 || IsPlayerAdmin(playerid))
- {
- return 1;
- }
- else
- {
- GetPlayerPos(playerid, x,y,z); SetPlayerPos(playerid, x,y,z+5);
- return MycarInfo(playerid, 1);
- }
- }
- }
- return 1;
- }
- //==============================================================================
- public OnPlayerExitVehicle( playerid, vehicleid )
- {
- //Script Loading
- return 1;
- }
- //==============================================================================
- // Car Info Stocks Funcions
- //==============================================================================
- stock pName(playerid)
- {
- new Name[MAX_PLAYER_NAME];
- GetPlayerName(playerid, Name, 24);
- return Name;
- }
- //==============================================================================
- stock MycarInfo(playerid, EID)
- {
- //================
- new string[500];
- //================
- if(EID == 1)
- {
- format(string,sizeof(string),"{59ff00}Acceasta masina este a lui {ff1500}%s\n{59ff00}Daca doresti si tu o masina personala contacteaza un {ff1500}Fondator ", Car_Personal);
- }
- //================
- return ShowPlayerDialog(playerid, 6000, DIALOG_STYLE_MSGBOX, "{ffffff}Personal {ff0000}Car {48ff00}Info", string, "Ok", "Close");
- //================
- }
- //==============================================================================
- stock LoadingSuccess(playerid)
- {
- //================
- new string[500];
- //================
- format(string,sizeof(string),"{59ff00}Felicitari {ff1500}%s {59ff00}tocmai ti-ai spawnat masina personala cu {ff1500}Succes", pName(playerid));
- //================
- return ShowPlayerDialog(playerid, 6000, DIALOG_STYLE_MSGBOX, "{ffffff}Personal {ff0000}Car {48ff00}Info", string, "Ok", "Close");
- //================
- }
- //==============================================================================
- stock allready(playerid)
- {
- return SendClientMessage(playerid, COLOR_RED, "ERROR: You allready have a vehicle!");
- }
- //==============================================================================
- stock LoadingJcar()
- {
- //--------------------------------------------------------------------------
- jcar = AddStaticVehicle(411, 308.6042, 1991.7235, 18.5776, 89.7925, 35,12);
- //--------------------------------------------------------------------------
- }
- /*
- ********************************************************************************
- JohnnyYz Personal Car
- Credits: JohnnyYz
- Helper : Sa-mp.com ; Sa-mp.ro
- Contact: Y/m : xt3z0ne / Skype : xt3z0ne123
- ~Info~
- Daca modifici creditele atunci sa iti fut morti ma-tii!!!
- ********************************************************************************
- stock LoadingSuccess(playerid)
- {
- new string[500],str[120];
- format(string,sizeof(string), "{59ff00}Felicitari {ff1500}%s {59ff00}tocmai ti-ai spawnat masina personala cu {ff1500}Succes", pName);
- return ShowPlayerDialog(playerid, 6000, "{ffffff}Personal {ff0000}Car {48ff00}Info", string,"Close", " ");
- }
- */
- CMD:test(playerid,params[])
- return SetPlayerPos( playerid, 308.6042, 1991.7235, 18.5776 ) ;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement