30.07.2011, 16:07
(
Последний раз редактировалось Toreno; 30.07.2011 в 17:06.
)
Try these, not tested.
EDIT: Do not update your SA-MP server to R5, because parameter "u" would stop working, ****** will fix this soon.
pawn Код:
CMD:energy(playerid, params[]) {
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, 0x0022FFFF, "You are not an administrator, so you can't use this command!");
SetPlayerHealth(playerid, 100);
return 1;
}
pawn Код:
CMD:kick(playerid, params[]) {
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You are not an administrator, so you can't use this command!");
new PID, reason[65], r_string[128];
if(sscanf(params, "uz", PID, reason)) return SendClientMessage(playerid, COLOR_GREY, "USAGE: /kick [playerid] [reason]");
if(PID == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_GREY, "Player is not connected!");
if(isnull(reason)) format(r_string, sizeof(r_string), "%s has kicked %s, reason: No reason", GetPlayerNameEx(playerid), GetPlayerNameEx(PID));
else format(r_string, sizeof(r_string), "%s has kicked %s, reason: %s", GetPlayerNameEx(playerid), GetPlayerNameEx(PID), reason);
SendClientMessageToAll(-1, r_string);
Kick(PID);
return 1;
}
stock GetPlayerNameEx(playerid) {
new PlayerName[MAX_PLAYER_NAME];
GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
return PlayerName;
}
pawn Код:
CMD:teleport(playerid, params[]) {
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You are not an administrator, so you can't use this command!");
new ID;
if(sscanf(params, "u", ID)) return SendClientMessage(playerid, COLOR_GREY, "USAGE: /goto [playerid]");
if(ID == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_GREY, "Player is not connected!");
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
SetPlayerPos(ID, x+1, y+1, z);
return 1;
}
pawn Код:
CMD:god(playerid, params[]) {
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, "You are not an admin");
if(!HasGod[playerid]) {
HasGod[playerid] = 1;
SendClientMessage(playerid, -1, "God mode turned on!");
} else if(HasGod[playerid]) {
HasGod[playerid] = 0;
SendClientMessage(playerid, -1, "God mode turned off!");
}
return 1;
}

