How to make a funny command for admins?
#1

I have this ide, but i dont know how i can make it -.-

Idea:
When i type this in chat: /facepalm 11(<-playerid)
then should this text show up for all:

Command ONLY for admin!
Reply
#2

Using sscanf and zcmd it would look like this:

pawn Код:
CMD:facepalm(playerid, params[])
{
    new
        otherid,
        oName[MAX_PLAYER_NAME],
        string[64]
    ;
    if (!IsPlayerAdmin(playerid)) return 0; // Checks if player is logged in with rcon
    if(sscanf(params, "u", otherid)) return SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /facepalm [id]");
   
    GetPlayerName(playerid, oName, sizeof(oName)); // Get the player name
    format(string, sizeof(string), "(FACEPALM) %s The doctor has detected a failz0r!", oName);
    SendClientMessageToAll(somecolor, string); // Sends this ^^ message to all
    return 1;
}
Reply
#3

Quote:

I have this ide, but i dont know how i can make it -.-

You did make that idea. It came off a cnr server that you're administrator on.

/fail
Reply
#4

Quote:
Originally Posted by mmrk
Посмотреть сообщение
Using sscanf and zcmd it would look like this:

pawn Код:
CMD:facepalm(playerid, params[])
{
    new
        otherid,
        oName[MAX_PLAYER_NAME],
        string[64]
    ;
    if (!IsPlayerAdmin(playerid)) return 0; // Checks if player is logged in with rcon
    if(sscanf(params, "u", otherid)) return SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /facepalm [id]");
   
    GetPlayerName(playerid, oName, sizeof(oName)); // Get the player name
    format(string, sizeof(string), "(FACEPALM) %s The doctor has detected a failz0r!", oName);
    SendClientMessageToAll(somecolor, string); // Sends this ^^ message to all
    return 1;
}
can you made the full script so i just can add the text to Pawno and save?
Reply
#5

Quote:
Originally Posted by HotRod
Посмотреть сообщение
You did make that idea. It came off a cnr server that you're administrator on.

/fail
no, thats a /faceplam :P
Reply
#6

Quote:
Originally Posted by HotRod
Посмотреть сообщение
You did make that idea. It came off a cnr server that you're administrator on.

/fail
Yes i make that idea!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)