NRG

Započeo Vilko, Septembar 25, 2009, 17:20:56 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Evo FS da kreiras NRG /nrg i kerirao si

                                                        ///////////////////////
                                                        //Personal NRG Script//
                                                        ///////Created by://///
                                                        ///////°Karlo°///////
                                                        ///////////////////////

//On top of your script:

new PVeh[MAX_PLAYERS];
forward DestroyNRG(playerid);


//OnPlayerDisconnect:

if( PVeh[playerid] > 0 )
{
    SetTimer("DestroyNRG",10000,0);
}


//Somewhere else in the script:

public DestroyNRG(playerid)
{
		DestroyVehicle(PVeh[playerid]);
		PVeh[playerid] = 0;
		print("A PVeh has been destroyed !");
}


//OnPlayerCommandText:

	if(strcmp(cmdtext, "/nrg", true)==0)
	{
		if( PVeh[playerid] > 0 )
		{
			if(GetPlayerVehicleID(playerid) !=  PVeh[playerid])
			{
				if(IsPlayerInAnyVehicle(playerid))
				{
					RemovePlayerFromVehicle(playerid);
				}
				new Float: X, Float: Y, Float: Z, Float: Ang, Name[30];
				GetPlayerPos(playerid, X, Y, Z);
				GetPlayerFacingAngle(playerid, Ang);
				GetPlayerName(playerid, Name, sizeof( Name ));
				PutPlayerInVehicle(playerid, PVeh[playerid], 0);
				SetVehiclePos(PVeh[playerid], X, Y, Z);
				SetVehicleZAngle(PVeh[playerid], Ang);
				SetVehicleHealth(PVeh[playerid],  1000.0);
				LinkVehicleToInterior(PVeh[playerid], GetPlayerInterior(playerid));
				SendClientMessage(playerid,0x0066FFAA, "personal nrg called.");
			}
			else
			{
				SendClientMessage(playerid,0xCC0000AA, "You are already on your personal nrg.");
			}
		}
		else
		{
			if(IsPlayerInAnyVehicle(playerid))
			{
				RemovePlayerFromVehicle(playerid);
			}
			new Float: X, Float: Y, Float: Z, Float: Ang, Name[30];
			GetPlayerPos(playerid, X, Y, Z);
			GetPlayerFacingAngle(playerid, Ang);
			GetPlayerName(playerid, Name, sizeof( Name ));
			PVeh[playerid] = CreateVehicle(522, X, Y , Z, Ang, 75,3, 5000000);
			PutPlayerInVehicle(playerid, PVeh[playerid], 0);
			LinkVehicleToInterior(PVeh[playerid], GetPlayerInterior(playerid));
			printf("personal nrg created for %s.", Name);
			SendClientMessage(playerid,0x0066FFAA, "personal nrg created.");
			SetVehicleParamsForPlayer(PVeh[playerid], playerid, 0, 0);
			for(new i=0; i <= MAX_PLAYERS; i++)
			{
				if ( IsPlayerConnected(i) )
				{
					if ( i != playerid )
					{
						SetVehicleParamsForPlayer(PVeh[playerid], i, 0, 1);
					}
				}
			}
		}
		return 1;
	}
Poslednja Izmena: Jul 01, 2019, 23:22:45 POSLE PODNE od Mister Naithan

MD Alex

Hehehe to je jako dobra stvar (Kopirana sa SA-MP Foruma) ali NICE...
Ubiti to vam je FS Koj dodate i kad udjete u igru unesete (nrg i dodje vam motor...(Naravno moze se podesavati da to mogu samo DONATORI , ADMINI ili svi vas izbor...)

r4z0r

Veoma simpaticno i lako za napravit :)

To sam skino GM pa sam onda prekopirao kao i neke trke ako trebate bilo sta samo recite i dam vam ako imam

Imam RALLY , CROSS,STREET,AERORACE,GAMEMASTER , NRG , myown game mod