Some Admin cmds
#1

I need some help with admin cmds (I use dcmd):

/fly (So I can go anywhere by flying)
/createveh (So I can create any vehicle anywhere)
/teleports (when I teleport someone it shows: you succesfully teleported 55544443343553 to PD)

and some other cmds... what you suggest me? Pls post

P.s.: My /sendtopd (sends players to police departament):

pawn Код:
dcmd_sendtopd(playerid, params[])
{
    new targetid, pName[MAX_PLAYER_NAME], Float:x, Float:y, Float:z;
    GetPlayerPos(playerid, Float:x, Float:y, Float:z);
    GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
    if(sscanf(params, "u", pName)) return SendClientMessage(playerid, COLOR_RED, "/sendtopd [playerid]");
    else if(IsPlayerAdmin(playerid)) return SendClientMessage(playerid, COLOR_RED, "You have no access to this command");
    else if(targetid == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_GREEN, "Player Not Found");
    else
    {
        SetPlayerPos(targetid, 1517.1479,-1619.2880,15.0087);
        SendClientMessage(playerid, COLOR_LIGHTBLUE, "You transfered %u to Police Departament");
    }
    return 1;
}
It shows like this:

You transfered 249234218 to Police Departament.

i need it like:

You transfered Nat(id) to Police Departament

And pls my other requests. thanks in advice
Reply
#2

Try:
pawn Код:
dcmd_sendtopd(playerid, params[])
{
    new targetid, pName[MAX_PLAYER_NAME];
    if(sscanf(params, "i", targetid)) return SendClientMessage(playerid, COLOR_RED, "/sendtopd [playerid]");
    if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, COLOR_RED, "You have no access to this command");
    if(targetid == INVALID_PLAYER_ID || !IsPlayerConnected(targetid)) return SendClientMessage(playerid, COLOR_GREEN, "Player Not Found");
    else
    {
        GetPlayerName(targetid, pName, MAX_PLAYER_NAME);
        SetPlayerPos(targetid, 1517.1479,-1619.2880,15.0087);
        new msg[128];
        format(msg, 128, "You transfered %s (ID: %i) to Police Departament", pName, targetid);
        SendClientMessage(playerid, COLOR_LIGHTBLUE, msg);
    }
    return 1;
}
Reply
#3

Umm... not completely working. Anyways, how about the other cmds?!
Reply
#4

Quote:
Originally Posted by Rivera
Посмотреть сообщение
Umm... not completely working. Anyways, how about the other cmds?!
Whats not working.

The other commands:
Make them on your own. Learn how to use the strings with this command, else you will never learn it. Thats they way I've learned it.
Reply
#5

pawn Код:
dcmd_sendtopd(playerid, params[])
{
    new targetid, pName[MAX_PLAYER_NAME], Float:x, Float:y, Float:z;
    GetPlayerPos(playerid, Float:x, Float:y, Float:z);
    if(sscanf(params, "u", pName)) return SendClientMessage(playerid, COLOR_RED, "/sendtopd [playerid]");
    else if(IsPlayerAdmin(playerid)) return SendClientMessage(playerid, COLOR_RED, "You have no access to this command");
    else if(targetid == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_GREEN, "Player Not Found");
    else
    {
        GetPlayerName(targetid, pName, MAX_PLAYER_NAME);
        SetPlayerPos(targetid, 1517.1479,-1619.2880,15.0087);
        format(msg, 128, "You transfered %s (ID: %d) to Police Departament", pName, targetid);
        SendClientMessage(playerid, COLOR_LIGHTBLUE, msg);
    }
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)