SA-MP Forums Archive
Need some DCMD Commands - 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)
+--- Thread: Need some DCMD Commands (/showthread.php?tid=458016)



Need some DCMD Commands - rehan007 - 14.08.2013

Hello,

i need /heal /god /slap /slapall and some more DCMD commands for admin i +REP who help me.


Re: Need some DCMD Commands - Vanter - 14.08.2013

This is the wrong section dude. but it's all about help
pawn Код:
dcmd_slap(playerid,params[])
{
    new string[128];
    new ID;
    if(sscanf(params,"us[100]",ID))
    {
        SendClientMessage(playerid,COLOR_RED,"[USAGE] /slap (Player Name/ID)");
        return 1;
    }
    if(!IsPlayerConnected(ID))
    {
        format(string,sizeof(string),"[ERROR] The player ID you entered is not connected to the server.");
        SendClientMessage(playerid,COLOR_RED,string);
        return 1;
    }
    new Float:x, Float:y, Float:z;
    GetPlayerPos(ID, x, y, z);
    SetPlayerPos(ID, x, y, z+5);
    return 1;
}

dcmd_slapall(playerid,params[])
{
    #pragma unused params
    new string[128];
        for(new i=0; i<MAX_PLAYERS; i++)
    {
          new Float:x, Float:y, Float:z;
      GetPlayerPos(i, x, y, z);
      SetPlayerPos(i, x, y, z+5);
      return 1;
       }
}

dcmd_god(playerid,params[])
{
    #pragma unused params
    SendClientMessage(playerid,COLOR_PINK,"You are now in admin mode.");
    SetPlayerColor(playerid,COLOR_RED);
    GivePlayerWeapon(playerid,38,999999);
    SetPlayerHealth(playerid,999999);
    SetPlayerArmour(playerid,999999);
    return 1;
}



Re: Need some DCMD Commands - rehan007 - 14.08.2013

Thankyou Guy,+REP