Checkpoint Password
#6

Have you thought of use /password command with parameters? I would do it in dcmd
For example:
pawn Код:
dcmd_password(playerid, params[])
{
   if (IsPlayerInCheckpoint(playerid) == 0) SendClientMessage(playerid, COLOR_RED, "You must be in the checkpoint to use this command");
   else
   {
     if (strlen(params) == 0) SendClientMessage(playerid, COLOR_RED, "Usage: /password [password]");
     else
     {
        if ((strmid(params, "Example", false) && (strlen(params) == 7))
        {
          SetPlayerInterior(playerid, 3);
          SetPlayerPos(playerid, 964.106994, -53.205497, 1001.124572);
          SendClientMessage(playerid, COLOR_RED, "Welcome To CDB and dayav07's Hideout");
        }
        else SendClientMessage(playerid, COLOR_RED, "Incorrect password!");
     }
   }
   return 1;
}
In this example, a player will be teleported to the hideout, if he writes /password Example and if he's in the checkpoint
Of course Example can be changed for any other string (but remember to change value of 7 in second condition - length of your password string)
Reply


Messages In This Thread
Checkpoint Password - by dayav07 - 23.09.2009, 16:16
Re: Checkpoint Password - by MultiGamer - 23.09.2009, 16:18
Re: Checkpoint Password - by shady91 - 23.09.2009, 16:25
Re: Checkpoint Password - by dayav07 - 23.09.2009, 16:56
Re: Checkpoint Password - by shady91 - 23.09.2009, 17:01
Re: Checkpoint Password - by Sznupek - 23.09.2009, 17:09
Re: Checkpoint Password - by dayav07 - 23.09.2009, 17:12

Forum Jump:


Users browsing this thread: 1 Guest(s)