Jump to content

Comenzi Folositoare


heatON

Recommended Posts

  • Replies 51
  • Created
  • Last Reply

Top Posters In This Topic

  • 1 month later...
  • 1 month later...

Stats pentru LUxAdmin cu dialoguri

#if USE_STATS == true
dcmd_stats(playerid,params[]) {
    new string[428], pDeaths, player1, h, m, s;
    if(!strlen(params)) player1 = playerid;
    else player1 = strval(params);

    if(IsPlayerConnected(player1)) {
        TotalGameTime(player1, h, m, s);
        if(AccInfo[player1][Deaths] == 0) pDeaths = 1; else pDeaths = AccInfo[player1][Deaths];
        format(string, sizeof(string), "| {FC0303}%s{00FF19}'s Stats \n{00FF19}Player Kills: {00CEFC}%d \n{00FF19}Player Deaths: {00CEFC}%d \n{00FF19}Player Ratio: %0.2f \n{00FF19}Player Money: {00CEFC}$%d \n{00FF19}Player Time: \n{00CEFC}%d{FC0303}*{00FF19}hrs \n{00CEFC}%d{FC0303}*{00FF19}mins \n{00CEFC}%d{FC0303}*{00FF19}secs |",PlayerName2(player1), AccInfo[player1][Kills], AccInfo[player1][Deaths], Float:AccInfo[player1][Kills]/Float:pDeaths,GetPlayerMoney(player1), h, m, s);
        return ShowPlayerDialog(playerid, 758, 0, "Player Stats", string, "Ok", "");
    } else return SendClientMessage(playerid, red, "Player Not Connected!");
}
#endif

lol

Link to comment
Share on other sites

  • 3 months later...
  • 2 weeks later...
  • 2 weeks later...

ZCMD comenzi:


CMD:setmedic(playerid,params[])
{
new id;
if(sscanf(params,"u",id)) return SendClientMessage(playerid,-1,"[ERROR][USUAGE]:/setmedic [id]");
if(id == INVALID_PLAYER_ID) return SendClientMessage(playerid,-1,"[ERROR]:Player is not connected!");
else if(Medic[id] == 1) return SendClientMessage(playerid,-1,"[ERROR]:This player is already medic!");
else if(IsPlayerLuxAdminLevel(playerid,3))
{
new string[256];
new name[MAX_PLAYER_NAME];
new playername[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,sizeof(name));
GetPlayerName(id,playername,sizeof(playername));

format(string,sizeof(string),"You set %s for to be medic.",playername);
SendClientMessage(playerid,COLOR_RED,string);

format(string,sizeof(string),"Admin %s set you medic.now you can use command /heal id",name);
SendClientMessage(id,COLOR_GREEN,string);

Medic[id]=1;

format(string,sizeof(string),"Admin %s set %s for to be medic!",name,playername);
SendClientMessageToAll(COLOR_RED,string);
}
else SendClientMessage(playerid,-1,"[ERROR]:You don't have enoungh level!");
return 1;
}

CMD:heal(playerid,params[])
{
new id;
if(sscanf(params,"u",id)) return SendClientMessage(playerid,-1,"[ERROR]:/heal [id]");
if(id == INVALID_PLAYER_ID) return SendClientMessage(playerid,COLOR_RED,"[ERROR]:Player is not connected!");
if(Medic[playerid] == 0) return SendClientMessage(playerid,COLOR_RED,"[ERROR]:You aren't a medic!");
else
{
new Float:Health;
GetPlayerHealth(id,Health);
if(Health >= 100)
{
SendClientMessage(playerid,COLOR_RED,"[ERROR]:Player have full HEALTH!");
}
else
{
new string[256];

new name[MAX_PLAYER_NAME];
new playername[MAX_PLAYER_NAME];

format(string,sizeof(string),"Medic %s healed you!",name);
SendClientMessage(id,COLOR_RED,string);

format(string,sizeof(string),"You Healed %s",playername);
SendClientMessage(playerid,COLOR_RED,string);

format(string,sizeof(string),"Medic %s healed %s",name,playername);
SendClientMessageToAll(COLOR_RED,string);
SetPlayerHealth(id,100);
}
}
return 1;
}

CMD:pmm(playerid,params[])
{
new id;
if(sscanf(params,"us",id,params[0])) return SendClientMessage(playerid,-1,"[ERROR][USUAGE]:/pmm [id] [text]");
if(id == INVALID_PLAYER_ID) return SendClientMessage(playerid,-1,"[ERROR]:Player is not connected!");
if(id == playerid) return SendClientMessage(playerid,-1,"[ERROR]You cannot send private message to you");
else
{
new string[256];
new name[MAX_PLAYER_NAME];
new playername[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,sizeof(name));
GetPlayerName(id,playername,sizeof(playername));

format(string,sizeof(string),"%s send to you a message:%s",name,params[0]);
SendClientMessage(id,COLOR_RED,string);

format(string,sizeof(string),"You send to %s a message:%s",playername,params[0]);
SendClientMessage(playerid,COLOR_RED,string);
}
return 1;
}


CMD:ammo(playerid,params[])
{
if(GetPlayerMoney(playerid) >=30000)
{
new weapon;
weapon = GetPlayerWeapon(playerid);
GivePlayerWeapon(playerid,weapon,500000);
}
else SendClientMessage(playerid,COLOR_RED,"[ERROR]:You don't have enoungh Money!30.000$");
return 1;
}

CMD:ann(playerid,params[])
{
if(sscanf(params,"s",params[0])) return SendClientMessage(playerid,-1,"[ERROR][USUAGE]:/ann [text]");
else
{
new Hour ,Minute, Second;
gettime(Hour,Minute,Second);
new string[256];
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,sizeof(name));
format(string,sizeof(string),"[SERVER]:Announce new.placed by %s:%s on %d/%d/%d",name,params[0],Hour,Minute,Second);
SendClientMessageToAll(COLOR_GREEN,string);
printf("[SERVER]:Announce new.placed by %s:%s on %d/%d/%d",name,params[256],Hour,Minute,Second);
}
return 1;
}
CMD:givescore(playerid,params[])
{
new id,score;
if(sscanf(params,"ud",id,score)) return SendClientMessage(playerid,-1,"[ERROR][USUAGE]:/givescore [id] [score]");
if(id == INVALID_PLAYER_ID) return SendClientMessage(playerid,-1,"[ERROR]:Player is not connected!");
else if(score >GetPlayerScore(playerid)) return SendClientMessage(playerid,-1,"[ERROR]:You don't have enoungh score!");
else if(id == playerid) return SendClientMessage(playerid,-1,"[ERROR]:You cannot give score yourself!");
else
{
new string[256];
new name[MAX_PLAYER_NAME];
new playername[MAX_PLAYER_NAME];
GetPlayerName(id,playername,sizeof(playername));
GetPlayerName(playerid,name,sizeof(name));

format(string,sizeof(string),"%s gave you %d.score",name,score);
SendClientMessage(id,COLOR_GREEN,string);

format(string,sizeof(name),"You give %d.score to %d.score",playername,score);
SendClientMessage(playerid,COLOR_GREEN,string);

SetPlayerScore(id,GetPlayerScore(id)+score);
SetPlayerScore(playerid,GetPlayerScore(playerid)-score);
}
return 1;
}
CMD:givecash(playerid,params[])
{
new id,money;
if(sscanf(params,"ud",id,money)) return SendClientMessage(playerid,-1,"[ERROR][USUAGE]:/givecash [id] [money]");
if(id == INVALID_PLAYER_ID) return SendClientMessage(playerid,-1,"[ERROR]Player is not connected!");
else if(id == playerid) return SendClientMessage(playerid,-1,"[ERROR]:You cannot give yourself cash!");
else if(money > GetPlayerMoney(playerid)) return SendClientMessage(playerid,-1,"[ERORR]:You don't have enoungh money!");
else
{
new string[256];
new name[MAX_PLAYER_NAME];
new playername[MAX_PLAYER_NAME];
GetPlayerName(id,playername,sizeof(playername));
GetPlayerName(playerid,name,sizeof(name));

format(string,sizeof(string),"%s gave you %d.money",name,money);
SendClientMessage(id,COLOR_GREEN,string);

format(string,sizeof(name),"You give %d.score to %d.money",playername,money);
SendClientMessage(playerid,COLOR_GREEN,string);

GivePlayerMoney(playerid,(0-money));
GivePlayerMoney(id,money);
}
return 1;
}

CMD:statss(playerid,params[])
{
new id;
if(sscanf(params,"u",id)) return SendClientMessage(playerid,-1,"[ERROR]:/statss [id]");
if(id == playerid)
{
new string[256];
new Name[MAX_PLAYER_NAME];
new ip[256];
GetPlayerName(playerid,Name,sizeof(Name));
GetPlayerIp(playerid,ip,sizeof(ip));
new Float:X,Y,Z,Angle;
GetPlayerPos(playerid,X,Y,Z);
GetPlayerFacingAngle(playerid,Angle);
format(string,sizeof(string),"Name:%s \nIp:%s \nScore:%d \nMoney:%d \nWanted:%d \nX:%f \nY:%f \nZ:%f \nAngle:%f",Name,ip,GetPlayerScore(playerid),GetPlayerMoney(playerid),GetPlayerWantedLevel(playerid),X,Y,Z,Angle);
ShowPlayerDialog(playerid,301,DIALOG_STYLE_MSGBOX,"Stats",string,"Ok","");
}
else
{
new string[256];
new Name[MAX_PLAYER_NAME];
new ip[256];
GetPlayerName(id,Name,sizeof(Name));
GetPlayerIp(id,ip,sizeof(ip));
new Float:X,Y,Z,Angle;
GetPlayerPos(id,X,Y,Z);
GetPlayerFacingAngle(id,Angle);
format(string,sizeof(string),"Name:%s \nIp:%s \nScore:%d \nMoney:%d \nWanted:%d \nX:%f \nY:%f \nZ:%f \nAngle:%f",Name,ip,GetPlayerScore(id),GetPlayerMoney(id),GetPlayerWantedLevel(id),X,Y,Z,Angle);
ShowPlayerDialog(playerid,301,DIALOG_STYLE_MSGBOX,"Stats",string,"Ok","");

format(string,sizeof(string),"%s looking at your status!");
ShowPlayerDialog(id,302,DIALOG_STYLE_MSGBOX,"Warning",string,"Ok","");
}
return 1;
}

sunt facute de mine de la 0% dintr-un gm in care este vreau sa-l fac mi-a fost sila sa scriu. atat de mult......asa ca am dat copy+paste :)

New GameMode In Development!-Romania Team Gang War-100%!...Datimi doua Motive afrimative de ce sa-l postez si-l postez...

Link to comment
Share on other sites

Guest RockStar

@[RSW]-MoArTeA-

Doamne...ce identare ai...

ON:

Va dau si eu o comanda care a fost in Drift World :|


CMD:np( playerid, params[ ] )

{

new N_R_String[ 100 ], V_R_ID = GetPlayerVehicleID( playerid ), Float:R_Pos[ 4 ];

if( isnull( params ) ) return SendClientMessage( playerid, COLOR_RED, "Usage: /npe <number>"); // Verify if is null

{

    GetVehiclePos( V_R_ID, R_Pos[ 0 ], R_Pos[ 1 ], R_Pos[ 2 ] ); // Get Vehicle Position

    GetVehicleZAngle( V_R_ID, R_Pos[ 3 ] ); // Get Vehicle Angle

   

    SetVehicleNumberPlate( V_R_ID, params ); // Set The vehicle number plate

    SetVehicleToRespawn( V_R_ID ); // Respawn vehicle

    PutPlayerInVehicle( playerid, V_R_ID, 0 ); // put player in respawned vehicle

   

    SetVehiclePos( V_R_ID, R_Pos[ 0 ], R_Pos[ 1 ], R_Pos[ 2 ] ); // Set the vehicle pos after respawning

    SetVehicleZAngle( V_R_ID, R_Pos[ 3 ] ); // Set vehicle Angle after respawning

   

    format( N_R_String, sizeof( N_R_String ), "You new Number Plate is: %s", params ); // Format String

    SendClientMessage( playerid, -1, N_R_String ); // Send formated string to playerid

}

return 1;

}


Link to comment
Share on other sites

Guest RockStar

-MoArTeA-" post="84256" timestamp="1310333771"]

si ce ma?.....daca am...? merge comanda,nu-s probleme ...ce mai vreti altceva?

Prietene...eu tiam dat doar un sfat.

E treaba ta, sunt scripturile tale faci cum vrei dar arata mult mai frumos cu o identare mai "normala"...

Link to comment
Share on other sites

  • 2 weeks later...
  • 5 months later...

@[RSW]-MoArTeA-

Doamne...ce identare ai...

ON:

Va dau si eu o comanda care a fost in Drift World :|


CMD:np( playerid, params[ ] )

{

new N_R_String[ 100 ], V_R_ID = GetPlayerVehicleID( playerid ), Float:R_Pos[ 4 ];

if( isnull( params ) ) return SendClientMessage( playerid, COLOR_RED, "Usage: /npe <number>"); // Verify if is null

{

    GetVehiclePos( V_R_ID, R_Pos[ 0 ], R_Pos[ 1 ], R_Pos[ 2 ] ); // Get Vehicle Position

    GetVehicleZAngle( V_R_ID, R_Pos[ 3 ] ); // Get Vehicle Angle

   

    SetVehicleNumberPlate( V_R_ID, params ); // Set The vehicle number plate

    SetVehicleToRespawn( V_R_ID ); // Respawn vehicle

    PutPlayerInVehicle( playerid, V_R_ID, 0 ); // put player in respawned vehicle

   

    SetVehiclePos( V_R_ID, R_Pos[ 0 ], R_Pos[ 1 ], R_Pos[ 2 ] ); // Set the vehicle pos after respawning

    SetVehicleZAngle( V_R_ID, R_Pos[ 3 ] ); // Set vehicle Angle after respawning

   

    format( N_R_String, sizeof( N_R_String ), "You new Number Plate is: %s", params ); // Format String

    SendClientMessage( playerid, -1, N_R_String ); // Send formated string to playerid

}

return 1;

}


error 017: undefined symbol "isnull" . Ai vreo idee cum se rezolva ?.

communitylogosml.png

94.23.120.101:7778

Link to comment
Share on other sites

  • 1 month later...
  • 2 months later...

Numar de inmatriculare la toate masinile cum vrei tu;)

[pawn] for (new i = 0; i <= MAX_VEHICLES; i++)

  {

    SetVehicleNumberPlate(i,"RZS");

    }[/pawn]

Topicul asta e pentru comenzi folositoare nu pentru functii.

Si explica mai mult, unde putem noi sa putem functia aia?

Link to comment
Share on other sites

  • 7 months later...

/etilotest - Vezi daca playeriul a baut.

 if (strcmp(cmd, "/etilotest" true) == 0)
     {
    if(IsPlayerConnected(playerid))
         {
         if (IsACop(playerid))
             {
            tmp = strtok(cmdtext, idx);
             if(!strlen(tmp))
                   {
              SendClientMessage(playerid, COLOR_GRAD1, "USAGE: /etilotest [playerid/PartOfName]");
              return 1;
                   }
                     giveplayerid = ReturnUser(tmp);
                     new level = GetPlayerDrunkLevel(giveplayerid);
                     GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
                     if(IsPlayerConnected(giveplayerid))
                       {
                        if(giveplayerid != INVALID_PLAYER_ID)
                         {
	                      if(GetDistanceBetweenPlayers(playerid,giveplayerid) < 3)
	                         {
	                           if(level > 600)
                                 {
	                            format(string, sizeof(string), "* %s grabs their breathalyzer and puts the tube into %s's mouth.", sendername ,giveplayer);
	                            ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
	                             SendClientMessage(playerid, COLOR_LIGHTBLUE, "** Breathalyzer Result: Intoxicated **");
	                             GameTextForPlayer(playerid,"~w~This player is~n~~r~Drunk", 8000, 1);
							     return 1;
	                                }
	                             else
	                                   {
                                 format(string, sizeof(string), "* %s grabs their breathalyzer and puts the tube into %s's mouth.", sendername ,giveplayer);
	                             ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
	                             SendClientMessage(playerid, COLOR_LIGHTBLUE, "** Breathalyzer Result: Not Intoxicated **");
	                             GameTextForPlayer(playerid,"~w~This player is~n~~r~Not Drunk", 8000, 1);
	                              return 1;
	                               }
                                }
                            }
                            }
                          else
		                    {
	                     SendClientMessage(playerid, COLOR_GRAD1, "   This player is offline !");
	                          }
	                       }
	                      else
                           	{
	                    SendClientMessage(playerid, COLOR_GRAD1, "   You are not authorized to use this command! (Cops Only)");
	                        }
                      	}
	                   return 1;
	                    }

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.