Secret tele
#1

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?
Reply
#2

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;
}
Reply
#3

Thanks but i want for admins not for rcon admins
Reply
#4

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

thanks
Reply
#6

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

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

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;
}
Reply
#9

But all the command are
dcmd_nameofcommand
Reply
#10

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


Forum Jump:


Users browsing this thread: 1 Guest(s)