Help about Checkpoints and other cmds!!!
#1

Hey Guys i have 2 problems !!

1. I HAVE a script in which when we say /work it shows a red marker and i go on that and it give money and disable checkpoint !!!

But i dont want like that !! I Need when a Player type /work it should show 1st checkpoint and then i go to checkpoint it should show 2nd checkpoint and when i go onto the second checkpoints then it should give me Money !!


2.Guys i made a cmd /stopwork and when i type /stopwork in-game "when u dont have money " it says "You Need $1000 to stop the work" but when the player have money it Just say : "You Have Cancelled the Work ! " And it does not take $1000 from Player !!!!

I Need that when Player is not on /work, it should say "You Need to Be in Work to Stop Work!"

Script:
Code:
#include <a_samp>

public OnPlayerCommandText( playerid, cmdtext[ ] )
{
	if( strcmp( cmdtext, "/work", true ) == 0 )
	{
		if( GetVehicleModel( GetPlayerVehicleID( playerid ) ) != 519 &&
			GetVehicleModel( GetPlayerVehicleID( playerid ) ) != 592 &&
			GetVehicleModel( GetPlayerVehicleID( playerid ) ) != 577 )
				return SendClientMessage( playerid, 0xFFFFFFFF, "Yor Need to be In A Vehicle to Do work!" );

		SetPlayerCheckpoint( playerid, 1644.4673, -2416.9844, 13.5547, 15.0 );
		return 1;
	}

	if( strcmp( cmdtext, "/stopwork", true ) == 0 )
	{
		if(GetPlayerMoney(playerid) >= 1000)
		{
			DisablePlayerCheckpoint( playerid );
			SendClientMessage(playerid,0xFFFFFFFFF,"You Have Canceled the Work!");
		}
		else
		{
			SendClientMessage(playerid,0xFFFFFFFFF,"You Need $1000 to Cancel the Work!");
		}
		return 1;
	}
	return 0;
}

public OnPlayerEnterCheckpoint( playerid )
{
	GivePlayerMoney( playerid, 10000 );
	DisablePlayerCheckpoint( playerid );
	return 1;
}


Hope you Got it !!! +1 for who helped me !!
Thanks
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)