Jump to content

Problema Job


angelo034

Recommended Posts

Am acest job si imi da banii dar dupa mi ia inapoi.. 

// This is a comment
// uncomment the line below if you want to write a filterscript
//#define FILTERSCRIPT

#include <a_samp>

new AeroplaneCars[3];

#if defined FILTERSCRIPT

public OnFilterScriptInit()
{
	print("\n--------------------------------------");
	print(" Blank Filterscript by your name here");
	print("--------------------------------------\n");
	return 1;
}

public OnFilterScriptExit()
{
	return 1;
}

#else

main()
{
	print("\n----------------------------------");
	print(" Blank Gamemode by your name here");
	print("----------------------------------\n");
}

#endif

public OnGameModeInit()
{
	AeroplaneCars[0] = CreateVehicle(513, 1636.4733, -2418.1831, 15.8022, 182.4404, -1, -1, 100);
	AeroplaneCars[1] = CreateVehicle(513, 1567.7761, -2412.8235, 15.8022, 182.4404, -1, -1, 100);
	AeroplaneCars[2] = CreateVehicle(513, 1554.8558, -2416.7524, 15.8022, 182.4404, -1, -1, 100);

	return 1;
}

public OnGameModeExit()
{
	return 1;
}

public OnPlayerRequestClass(playerid, classid)
{
	return 1;
}

public OnPlayerConnect(playerid)
{
	return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
	return 1;
}

public OnPlayerSpawn(playerid)
{
	return 1;
}

public OnPlayerDeath(playerid, killerid, reason)
{
	return 1;
}

public OnVehicleSpawn(vehicleid)
{
	return 1;
}

public OnVehicleDeath(vehicleid, killerid)
{
	return 1;
}

public OnPlayerText(playerid, text[])
{
	return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
	if (strcmp("/mycommand", cmdtext, true, 10) == 0)
	{
		// Do something here
		return 1;
	}
	return 0;
}

public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
	return 1;
}

public OnPlayerExitVehicle(playerid, vehicleid)
{
	if(vehicleid == AeroplaneCars[0] || AeroplaneCars[1] || AeroplaneCars[2] )
	{
	    DisablePlayerCheckpoint(playerid);
		SetVehicleToRespawn(vehicleid);
		SendClientMessage(playerid, -1, "Jobul tau a esuat!");
	}
	return 1;
}

public OnPlayerStateChange(playerid, newstate, oldstate)
{
	if(newstate == PLAYER_STATE_DRIVER)
	{
	    new vehicleid = GetPlayerVehicleID(playerid);
        if(vehicleid == AeroplaneCars[0] || AeroplaneCars[1] || AeroplaneCars[2] )
	    {
	        DisablePlayerCheckpoint(playerid);
	        SetPlayerCheckpoint(playerid, 1432.0229, 1613.5057, 11.7452, 5.0);
		}
	}
	return 1;
}

public OnPlayerEnterCheckpoint(playerid)
{
		SetVehicleToRespawn(GetPlayerVehicleID(playerid));
		new randomoney = 30000 + random(30000);
		new string[256];
		format(string, sizeof(string), "Ai terminat cursa si ai primit $%d", randomoney);
		SendClientMessage(playerid, -1, string);
		GivePlayerMoney(playerid, random(50000) + 8501);
		DisablePlayerCheckpoint(playerid);
		
	return 1;
}

public OnPlayerLeaveCheckpoint(playerid)
{
	return 1;
}

public OnPlayerEnterRaceCheckpoint(playerid)
{
	return 1;
}

public OnPlayerLeaveRaceCheckpoint(playerid)
{
	return 1;
}

public OnRconCommand(cmd[])
{
	return 1;
}

public OnPlayerRequestSpawn(playerid)
{
	return 1;
}

public OnObjectMoved(objectid)
{
	return 1;
}

public OnPlayerObjectMoved(playerid, objectid)
{
	return 1;
}

public OnPlayerPickUpPickup(playerid, pickupid)
{
	return 1;
}

public OnVehicleMod(playerid, vehicleid, componentid)
{
	return 1;
}

public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
{
	return 1;
}

public OnVehicleRespray(playerid, vehicleid, color1, color2)
{
	return 1;
}

public OnPlayerSelectedMenuRow(playerid, row)
{
	return 1;
}

public OnPlayerExitedMenu(playerid)
{
	return 1;
}

public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
{
	return 1;
}

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
	return 1;
}

public OnRconLoginAttempt(ip[], password[], success)
{
	return 1;
}

public OnPlayerUpdate(playerid)
{
	return 1;
}

public OnPlayerStreamIn(playerid, forplayerid)
{
	return 1;
}

public OnPlayerStreamOut(playerid, forplayerid)
{
	return 1;
}

public OnVehicleStreamIn(vehicleid, forplayerid)
{
	return 1;
}

public OnVehicleStreamOut(vehicleid, forplayerid)
{
	return 1;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
	return 1;
}

public OnPlayerClickPlayer(playerid, clickedplayerid, source)
{
	return 1;
}

 

Link to comment
Share on other sites

1 hour ago, DanielMayson said:

va apucati de servere dar nu va pricepeti la scripting :)):)):)):)):)):))

Nu cred ca este nevoie de un astfel de comentariu. E la inceput, va invata el mai tarziu. Deci te rog abtinete.

 

On 10/30/2016 at 8:14 PM, angelo034 said:

Cum verific la ce linie , la ce public

 

Cel mai bine este sa intregrezi acest script in gamemode. Adica unde ai de ex:

public OnPlayerEnterCheckpoint(playerid)
{
		SetVehicleToRespawn(GetPlayerVehicleID(playerid));
		new randomoney = 30000 + random(30000);
		new string[256];
		format(string, sizeof(string), "Ai terminat cursa si ai primit $%d", randomoney);
		SendClientMessage(playerid, -1, string);
		GivePlayerMoney(playerid, random(50000) + 8501);
		DisablePlayerCheckpoint(playerid);
		
	return 1;
}

Adaugi la OnPlayerEnterCheckpoint din gamemode-ul tau.

 

1859311972_BANNER-GIREADAcopy-min.thumb.png.48e5e420ae2185dce5b244965a1d2601.png

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

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