Why not working?
#1

I made a mission system and it have no errors but its not working in the game
Код:
//~~~~~~~~~~~~~~~Pizza Missions By Tuntun~~~~~~~~~~~~~~~
//Do Not remove his credits!

#include <a_samp>
#include <zcmd>

new PizzaJob[300];

new IsPlayerInMission[MAX_PLAYERS];

public OnFilterScriptInit()
{
    CreateVehicle(448, 2098.7107, -1821.3761, 12.8967, 0.0000, -1, -1, 100);
}
public OnPlayerCommandText(playerid, cmdtext[])
{
	if(!strcmp("/pwork", cmdtext, true))
	{
		new pvehiclemodel = GetVehicleModel(GetPlayerVehicleID(playerid));
		if(IsPlayerInMission[playerid] >= 1)return SendClientMessage(playerid,-1,"You already have a mission!");
		if (pvehiclemodel == 448)
		{
			PizzaJob[playerid] = 1;
			SetPlayerCheckpoint(playerid, 2099.0190,-1806.6707,13.5551,3.5);
			SendClientMessage(playerid, -1,"~g~Info: ~w~Mission started You have to go at 2 houses! Please follow the check point!");
			GameTextForPlayer(playerid,"~w~Mission~g~Started!", 3000, 3);
			return 1;
		}
		SendClientMessage(playerid, -1,"You have to be on a pizza bike to start pizza boy mission!");
	}
	return 0;
}
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
	if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 448)
	{
		SendClientMessage(playerid,-1,"Must use /pwork to start the mission");
	}
	return 0;
}
public OnPlayerEnterCheckpoint(playerid)
{
	if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 448)
	{
		if(PizzaJob[playerid] == 1){
			PizzaJob[playerid] = 2;
			SetPlayerCheckpoint(playerid, 1936.2399,-1923.8591,13.5469, 3.5 );
			GameTextForPlayer(playerid,"~w~Mission ~g~ Started!", 3000, 3);
			return 1;
		}
		if(PizzaJob[playerid] == 2){
   		   	PizzaJob[playerid] = 3;
			SetPlayerCheckpoint(playerid,1921.4567,-1992.3204,13.5469, 3.5 );
			GameTextForPlayer(playerid,"~w~Go to Another House!", 3000, 3);
			return 1;
		}
		if(PizzaJob[playerid] == 3){
			PizzaJob[playerid] = 0;
			DisablePlayerCheckpoint(playerid);
			SendClientMessage(playerid, -1,"Info: Mission Completed! Earned 20,000$ & 5 score");
			GivePlayerMoney(playerid,20000);
			GameTextForPlayer(playerid,"~w~ Mission ~g~ Completed!", 3000, 3);
			SetPlayerScore(playerid,5);
		}
	}
	return 1;
}
CMD:pizza(playerid,params[])
{
	SetPlayerPos(playerid,2021.6563, -1810.7266, 18.6016);
	return 1;
}
Reply


Messages In This Thread
Why not working? - by Tuntun - 21.06.2013, 05:21
Re: Why not working? - by park4bmx - 21.06.2013, 05:26
Re: Why not working? - by Tuntun - 21.06.2013, 05:34
Re: Why not working? - by Goldilox - 21.06.2013, 06:02
Re: Why not working? - by Tuntun - 21.06.2013, 06:09
Re: Why not working? - by Affan - 21.06.2013, 06:30
Re: Why not working? - by Sasino97 - 21.06.2013, 06:30
Re: Why not working? - by Tuntun - 21.06.2013, 06:41

Forum Jump:


Users browsing this thread: 1 Guest(s)