Enter and Exit
#10

Heres a version using sscanf.
pawn Код:
dcmd_enter(playerid,params[])
{
    new tpid[16];//change if you need a bigger string. or smaller
    if(sscanf(params,"s",tpid))return SendClientMessage(playerid,0xff0000FF,"Error Usage: /enter <interiorname>");

    if(!strcmp(tpid,"lspd",true,4))//see if the string is lspd eg, /enter lspd
    {
        SetPlayerPos(playerid,x,y,z);//put ur co-ords here
        SetPlayerInterior(playerid,0);//swap '0' for the interior of your choice
        //other stuff
    }
    if(!strcmp(tpid,"ems",true,3))//see if strng is ems
    {
        //blahblah
    }
    return 1;
}
You will probably wana put other stuff lke setplayervirtualworld.(or maybe not)
Reply


Messages In This Thread
Enter and Exit - by Luis_Leone - 05.08.2010, 04:39
Re: Enter and Exit - by Luis_Leone - 05.08.2010, 16:17
Re: Enter and Exit - by Jeffry - 05.08.2010, 16:19
Re: Enter and Exit - by Luis_Leone - 05.08.2010, 16:23
Re: Enter and Exit - by Luis_Leone - 05.08.2010, 17:03
Re: Enter and Exit - by Jeffry - 05.08.2010, 17:13
Re: Enter and Exit - by Kar - 05.08.2010, 17:15
Re: Enter and Exit - by selten98 - 05.08.2010, 17:16
Re: Enter and Exit - by Jeffry - 05.08.2010, 17:17
Re: Enter and Exit - by iggy1 - 05.08.2010, 17:19

Forum Jump:


Users browsing this thread: 3 Guest(s)