If player Inbank=1 HELP
#1

Well' if some of you have noticed, i'm creating a New Bank system but i want it so if the player /enters the bank then Inbank[playerid] = 1; but how do i check if the player is in the bank?

This is what I mean

Код:
	if (strcmp("/load", cmdtext, true, 10) == 0)
	{
		SetPlayerCheckpoint(playerid,2044.7601,210.5925,0.9093, 2);
 		GameTextForPlayer(playerid, "Proceed to the Checkpoint",300,1);
		return 1;
	}
I want it so if the player is at the bank it will say that else SendClientMessage you are not at the bank, Any Ideas?, Thanks.

-Mike.
Reply
#2

I'm (guessing) theres a way to do this with "OnPlayerUpdate"

Heres my GUESS, its not tested.

pawn Код:
public OnPlayerUpdate
{
if(GetPlayerInterior(playerid)) = INTERIORID
{
Inbank[playerid] = 1;
return 1;
}
}
Reply
#3

I know what you mean but its not what i mean, i mean if you type /load and your at the bank it will happen but if not then it will send you a message, but because i'm using Inbank = 1; i dont know...

Thanks for helping though..

-Mike.
Reply
#4

maybe..

pawn Код:
if (strcmp("/load", cmdtext, true, 10) == 0)
{
if(Inbank[playerid] = 0) return SendClientMessage(playerid,color,"You must be in the bank to use this command!");
SetPlayerCheckpoint(playerid,2044.7601,210.5925,0.9093, 2);
GameTextForPlayer(playerid, "Proceed to the Checkpoint",300,1);
return 1;
}
Once again, not tested.
Reply
#5

It still says Proceed to the Checkpoint, even with your code, Thanks though

-Mike.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)