SA-MP Forums Archive
Please Help ME - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Please Help ME (/showthread.php?tid=219940)



Please Help ME - Venice - 02.02.2011

Anybody Give IRC !pm cmd !slap cmd and !players script


Re: Please Help ME - Venice - 02.02.2011

anybody reply


Re: Please Help ME - Unknown123 - 02.02.2011

Quote:
Originally Posted by venice
Посмотреть сообщение
anybody reply
Why not use dmcd?


Re: Please Help ME - Cameltoe - 02.02.2011

Anybody please stop this spammer

Also this should belong to the request thread.


Re: Please Help ME - Venice - 02.02.2011

dmcd ?


Quote:
Originally Posted by Cameltoe
Посмотреть сообщение
Anybody please stop this spammer

Also this should belong to the request thread.
See the post time


Re: Please Help ME - Unknown123 - 02.02.2011

dcmd + sscanf

pawn Код:
#include <a_samp>
#include <sscanf>

#define dcmd(%1,%2,%3) if (!strcmp((%3)[1], #%1, true, (%2)) && ((((%3)[(%2) + 1] == '\0') && (dcmd_%1(playerid, ""))) || (((%3)[(%2) + 1] == ' ') && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1

public OnPlayerCommandText(playerid, cmdtext[])
{
    dcmd(slap, 4, cmdtext);
    return 0;
}

dcmd_slap(playerid, params[])
{
    new targetid;

    if(sscanf(params, "u", targetid)) return SendClientMessage(playerid, COLOR_USAGE, "USAGE: /slap (id)");
    else if(targetid == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_ERROR, "Invalid ID");
    {
        new playername[MAX_PLAYER_NAME], targetname[MAX_PLAYER_NAME], string[256];
        GetPlayerName(playerid, playername, sizeof(playername));
        GetPlayerName(targetid, targetname, sizeof(targetname));

        format(string, sizeof(string), "Admin: %s(%d) slapped %s(%d)",playername, playerid, targetname, targetid);
        SendClientMessageToAll(0xFF0000FF, string);
       
        new Float:X, Float:Y, Float:Z;
        SetPlayerPos(targetid, X, Y, Z + 10);
        return 1;
    }
}



Re: Please Help ME - Cameltoe - 02.02.2011

Quote:
Originally Posted by venice
Посмотреть сообщение
dmcd ?



See the post time
Yes? double posting after two hours isn't allowed.

Readme.


Re: Please Help ME - alpha500delta - 02.02.2011

Unknown123, IRC is something else then dcmd. Do you even know what irc is?


Re: Please Help ME - Unknown123 - 02.02.2011

Quote:
Originally Posted by alpha500delta
Посмотреть сообщение
Unknown123, IRC is something else then dcmd. Do you even know what irc is?
Nope i dont know what it is ^^
What is it..?