Need help from scripter
#7

/sendmoney:
PHP код:
CMD:sendmoney(playeridparams[])
{
    new 
giveplayeridamountMessage[128], pName[MAX_PLAYER_NAME],pName1[MAX_PLAYER_NAME],Message1[128];
    if (
sscanf(params"ud"giveplayeridamount)) SendClientMessage(playerid0xf8f8f8ff"Syntax: {f00f00}/sendmoney [playerid/partname] [amount]");
    else if (!
IsPlayerConnected(giveplayerid)) SendClientMessage(playerid0xf8f8f8fff"ERROR: {FFFFFF}Player isn't connected!");
    else if (
giveplayerid == playeridSendClientMessage(playerid0xf8f8f8fff"ERROR: {F00f00}You cannot send money to yourself!");
    else if (
amount GetPlayerMoney(playerid)) SendClientMessage(playerid0xf8f8f8fff"ERROR: {Ffffff}You Don't have that much!");
    else if (
amount 0SendClientMessage(playerid0xf8f8f8fff,"ERROR: {f00f00}Wrong Value!");
    else
    {
        
GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
        
GetPlayerName(giveplayerid,pName1,MAX_PLAYER_NAME);
        
GivePlayerMoney(giveplayeridamount);
        
GivePlayerMoney(playerid, -amount);
        
format(Messagesizeof(Message), "You have Received $%d From {f00f00}%s(%d)!",amountpNameplayerid);
        
SendClientMessage(giveplayerid,-1Message);
        
GameTextForPlayer(giveplayerid"~W~! ~Y~RECEIVED ~G~CASH ~W~!"3000,3);
        
format(Message1sizeof(Message1), "Successfully sent $%d to {f00f00}%s(%d)!",amountpName1giveplayerid);
        
SendClientMessage(playerid,-1Message1);
        
GameTextForPlayer(playerid"~W~! ~G~CASH ~y~SENT ~W~!"3000,3);
    }
    return 
1;

/god:
PHP код:
new God[MAX_PLAYERS];
CMD:god(playeridparams[])
{
        if (
God[playerid] == 1)
        {
            
SendClientMessage(playeridCOLOR_RED".:. {e6e600}You have disabled god mode.");
            
SetPlayerHealth(playerid100);
            
SetPlayerArmour(playerid100);
            
God[playerid] = 0;
            return 
1;
         }
         else if(
God[playerid] == 0)
         {
             
SendClientMessage(playeridCOLOR_GREEN".:. {ff3399}You have enabled god mode.");
            
God[playerid] = 1;
            
SetPlayerArmour(playerid9999999);
            
SetPlayerHealth(playerid9999999);
            return 
1;
        }
        return 
1;

/heal:
PHP код:
CMD:heal(playeridparams[])
{
    if(
IsPlayerAdmin(playerid))
    {
    new 
targetidstring[100];
    if(
sscanf(params"i"targetid)) return SendClientMessage(playerid0xF8F8F8FFF"[SYNTAX]: {FFFFFF}/heal {FF0000}[PlayerID]");
    if(!
IsPlayerConnected(targetid)) return SendClientMessage(playerid0xF8F8F8FFF"[ERROR]: {FFFFFF}This player is {FF0000}NOT {FFFFFF}connected!");
    
SetPlayerHealth(targetid100.0);
    
format(stringsizeof(string), "* {FFFFFF}Administrator {FFD700}%s(ID:%d) {FFFFFF}has Healed {FFD700}%s(ID:%d){FFFFFF}!"GetName(playerid), playeridGetName(targetid), targetid);
    
SendClientMessageToAll(0xF8F8F8FFFstring);
    }
    else
    {
    
SendClientMessage(playerid0xF8F8F8Fff"* {FFFFFF}You Have to be {FFD700}Admin Level 1{FFFFFF} at-least to use this command!");
    }
    return 
1;

/kill:
PHP код:
CMD:kill(playerid,params[])
{
   new 
string[128]; new name[MAX_PLAYER_NAME];
   
SetPlayerHealth(playerid,0.0);
   
GetPlayerName(playeridnameMAX_PLAYER_NAME);
   
format(stringsizeof(string), "{00ffff}: {F00f00}%s Has Dead. (/kill)"name);
   
SendClientMessageToAll(0xF8F8F8FFFstring);
   return 
1;

Reply


Messages In This Thread
Need help from scripter - by Advait - 31.03.2017, 16:42
Re: Need help from scripter - by Jelly23 - 31.03.2017, 16:49
Re: Need help from scripter - by Advait - 31.03.2017, 16:56
Re: Need help from scripter - by LazzyBoy - 31.03.2017, 17:11
Re: Need help from scripter - by Advait - 31.03.2017, 17:16
Re: Need help from scripter - by MarkNelson - 31.03.2017, 17:36
Re: Need help from scripter - by iMaxy - 31.03.2017, 17:57
Re: Need help from scripter - by Advait - 01.04.2017, 04:15
Re: Need help from scripter - by Flamehaze7 - 01.04.2017, 06:33

Forum Jump:


Users browsing this thread: 1 Guest(s)