Commands doesn't work!
#5

Try these, not tested.
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;
}
EDIT: Do not update your SA-MP server to R5, because parameter "u" would stop working, ****** will fix this soon.
Reply


Messages In This Thread
Commands doesn't work! - by samtey - 30.07.2011, 15:53
AW: Commands doesn't work! - by Tigerkiller - 30.07.2011, 15:59
Re: Commands doesn't work! - by VitalRP - 30.07.2011, 16:01
AW: Commands doesn't work! - by samtey - 30.07.2011, 16:02
Re: Commands doesn't work! - by Toreno - 30.07.2011, 16:07
Re: Commands doesn't work! - by Kush - 30.07.2011, 16:14
Re: Commands doesn't work! - by Toreno - 30.07.2011, 16:21
AW: Commands doesn't work! - by samtey - 30.07.2011, 16:27
Re: Commands doesn't work! - by Toreno - 30.07.2011, 16:29
AW: Commands doesn't work! - by samtey - 30.07.2011, 16:39
Re: Commands doesn't work! - by Shadoww5 - 30.07.2011, 16:40
AW: Commands doesn't work! - by samtey - 30.07.2011, 16:48
Re: AW: Commands doesn't work! - by Kush - 30.07.2011, 16:53
Re: Commands doesn't work! - by Toreno - 30.07.2011, 16:54
AW: Commands doesn't work! - by samtey - 30.07.2011, 16:59
Re: Commands doesn't work! - by Beanz - 30.07.2011, 17:02
Re: Commands doesn't work! - by Kush - 30.07.2011, 17:08

Forum Jump:


Users browsing this thread: 1 Guest(s)