05.08.2010, 17:19
Heres a version using sscanf.
You will probably wana put other stuff lke setplayervirtualworld.(or maybe not)
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;
}