Is it Possible?
#1

Hai there, i am scripting/mapping a Hotel and i added a money box which will have a lot of money, but is it possible to add a password system like you go to the checkpoint then you shall type the correct password or if you type wrong he will be killed.
Reply
#2

Yes.

Take it as basic , and change to whatever you need.

pawn Код:
public OnPlayerEnterCheckpoint(playerid)
{
    new string[256];

    switch(getCheckpointType(playerid))
    {


        case CP_HOSPITALin:
            {
            if(GetPlayerVirtualWorld(playerid) == 1) { // LS MARKET
            SetPlayerInterior(playerid,0);
            SetPlayerPos(playerid,1177.1379,-1325.4160,14.0559);
            SendClientMessage(playerid,COLOR_YELLOW,"You have exited All Saints General Hospital.");
            SetPlayerFacingAngle(playerid,271.3165);
            SetPlayerVirtualWorld(playerid,0);
Of course return the public, and start to work on dialog to password and add else if the player wrong Kill him.

Now

pawn Код:
if(strcmp(cmdtext, "/moneybox", true)==0)
{
  if(IsPlayerInCheckpoint(playerid))
  {
    else
    {
      SendClientMessage(playerid, red, "Error: You need to be in at the checkpoint to use the moneybox!");
    }
  }
  else
  {
    SendClientMessage(playerid, red, "Error: You are not in the checkpoint!");
  }
  return 1;
}
Add dialog, a else if player missing blabla.
Reply
#3

Thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)