30.07.2011, 08:37
Yes.
Kick Command:
God Command:
Teleport Command:
Stripped from my little book of Commands...
Kick Command:
PHP код:
CMD:kick(playerid, params[])
{
if(IsPlayerAdmin(playerid))
{
new PID, pName[MAX_PLAYER_NAME], Sender[MAX_PLAYER_NAME], Str;
if(sscanf(params, "us[128]", PID, params)) return SendClientMessage(playerid, COLOR_GREY, "USAGE: /kick [playerid] [reason]");
if(!IsPlayerConnected(PID)) return SendClientMessage(playerid, COLOR_GREY, "Player is not connected!");
Kick(PID);
}
else
{
SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use that command!");
}
return 1;
}
PHP код:
CMD:god(playerid, params[])
{
if(IsPlayerAdmin(playerid))
{
SetPlayerHealth(playerid, 10000000);
SetPlayerArmour(playerid, 10000000);
}
else
{
SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use that command!");
}
return 1;
}
PHP код:
CMD:teleport(playerid, params[])
{
if(IsPlayerAdmin)
{
new ID;
new Str[64];
if(sscanf(params, "u", ID)) SendClientMessage(playerid, COLOR_GREY, "USAGE: /goto [playerid]");
else if(IsPlayerConnected(ID) == 0) SendClientMessage(playerid, COLOR_GREY, "Player is not connected!");
else
{
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
SetPlayerPos(ID, x+1, y+1, z);
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use that command!");
}
return 1;
}