SA-MP Forums Archive
Secret tele - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Secret tele (/showthread.php?tid=249936)



Secret tele - IvancheBG - 21.04.2011

Hi.I use Ladmin4 but i want to make a command to go to my house because I made a house and i want only admins to go there.How to do that?


Re: Secret tele - Admigo - 21.04.2011

if(strcmp(cmd, "/myhouse", true) == 0) {
if(!IsPlayerAdmin(playerid))
{
SendClientMessage(playerid,0xFF0000AA,"You can't use this command.");
return 1;
}
SendClientMessage(playerid, 0xFF7F50AA, "You teleported to your house!");
SetPlayerPos(X,Y,Z);//you coordinates
SetPlayerInterior(playerid,interiorid);//your interior id
return 1;
}


Re: Secret tele - IvancheBG - 21.04.2011

Thanks but i want for admins not for rcon admins


Re: Secret tele - Stigg - 21.04.2011

Change:
pawn Код:
if(!IsPlayerAdmin(playerid))
To:
pawn Код:
if(!IsPlayerLAdmin(playerid))



Re: Secret tele - IvancheBG - 21.04.2011

thanks


Re: Secret tele - Stigg - 21.04.2011

Quote:
Originally Posted by IvancheBG
Посмотреть сообщение
thanks
No prob's m8'y.


Re: Secret tele - IvancheBG - 21.04.2011

Where to put the Command?Because this admin script uses zmcd


Re: Secret tele - mitosking - 21.04.2011

Under a CMD, insert "CMD:nameofcommand". Example:

pawn Код:
CMD:teleport(playerid, params[])
{
if(!IsPlayerLAdmin(playerid)) return 0; // You can change this return
SetPlayerPos(playerid, x, y, z); // You change x, y and z
SendClientMessage(...) // Insert a message
return 1;
}



Re: Secret tele - IvancheBG - 21.04.2011

But all the command are
dcmd_nameofcommand


Re: Secret tele - HyperZ - 21.04.2011

Quote:
Originally Posted by IvancheBG
Посмотреть сообщение
But all the command are
dcmd_nameofcommand
dcmd isn't zcmd btw
Put it on bottom of your script.