Jump to content
  • 0

Ploblema Jetpack and Flip


Question

Posted

[move] Salut baieti![/move]

Am o ploblema cu sytemu de admin. Cand intru pe server si vreau sa scriu Jetpack sau Flip imi zice ca nu am level(admin) destul de mare sa folosesc aceste comenzi :shocked:  Eu pot sa folosesc comenzile astea ca sunt admin dar eu as vrea ca toti playerii sa poata folosii aceste comenzi /jetpack si /flip .

Cum fac chestia asta? :undecided: :undecided: :undecided:

Va rog,daca stie cineva sa lase un reply.

Edit:dupa ce am bagat 0 in loc de acele cifre dau compule,si dupaia intru pe server ni nu merge systemu de admin, iar daca sterg 0 si pun cifrele care ierau merge.

DC?

200r807.gif

9 answers to this question

Recommended Posts

Posted

pune asa la comanda de jetpack

[pawn]if(strcmp(cmdtext, "/jetpack" , true) == 0)

SetPlayerSpecialAction(playerid,SPECIAL_ACTION_USEJETPACK);

return 1;

}[/pawn]

Stiu ca nu am voie sa dau comenzi dar sa fim mai bun la suflet :))

iar pentru comanda flip puneo aici

Massari e curva mea

Posted

//==========================[Jetpack]===================================================
	if (strcmp(cmd, "/jetpack", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
			if (PlayerInfo[playerid][pAdmin] >= 7) //Level admin
			{
			    SendClientMessage(playerid, COLOR_GREY, "Now you have the jetpack  By TyX!");
                SetPlayerSpecialAction(playerid, 2);
                return 1;
			}
		}
	}
//=====================================[FLIP]============================================================
	if(strcmp(cmd, "/flip", true) == 0)
	{
		if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_BLUE, "You are not in vehicle!");
	 	{
	 	    if(PlayerInfo[playerid][pAdmin] < 3) // level admin
			{
			    SendClientMessage(playerid, COLOR_GRAD1, "You do not have access to this command");
			    return 1;
			}
	 		new vehicle;
		 	new Float:zangle;
		 	vehicle = GetPlayerVehicleID(playerid);
		 	GetVehicleZAngle(vehicle,zangle);
	 		SetVehicleZAngle(vehicle,zangle);
		 	SendClientMessage(playerid, COLOR_BLUE, "Your car was returned successfully by TyX!");
     	}
     	return 1;
 	}

Posted

Jetpack:

- Strcmp

[pawn]if ( strcmp( cmdtext, "/jetpack" , true ) == 0 )

{

        SetPlayerSpecialAction( playerid, SPECIAL_ACTION_USEJETPACK );

        return ( 1 );

}[/pawn]

- Zcmd

[pawn]CMD:jetpack( playerid, params[ ] )

{

      SetPlayerSpecialAction( playerid, SPECIAL_ACTION_USEJETPACK );

      return ( 1 );

}[/pawn]

Flip:

- Strcmp

[pawn]if ( strcmp( cmdtext, "/flip", true )== 0 )

{

        new VehicleID,

                Float:X,

                Float:Y,

                Float:Z

        ;

        new State=GetPlayerState( playerid );

        if ( IsPlayerInAnyVehicle( playerid ) && State == PLAYER_STATE_DRIVER )

        {

GetPlayerPos( playerid, X, Y, Z );

VehicleID = GetPlayerVehicleID( playerid );

SetVehiclePos( VehicleID, X, Y, Z );

SetVehicleZAngle( VehicleID, 0 );

SetVehicleHealth( VehicleID, 1000.0 );

SendClientMessage( playerid, COLOR_GREY, "Vehicle Fliped!" );

        }

        else SendClientMessage( playerid, COLOR_RED, "Nu esti intr-o masina!" );

        return ( 1 );

}[/pawn]

- Zcmd

[pawn]CMD:flip( playerid, params[ ] )

{

        new VehicleID,

                Float:X,

                Float:Y,

                Float:Z

        ;

        new State=GetPlayerState( playerid );

        if ( IsPlayerInAnyVehicle( playerid ) && State == PLAYER_STATE_DRIVER )

        {

GetPlayerPos( playerid, X, Y, Z );

VehicleID = GetPlayerVehicleID( playerid );

SetVehiclePos( VehicleID, X, Y, Z );

SetVehicleZAngle( VehicleID, 0 );

SetVehicleHealth( VehicleID, 1000.0 );

SendClientMessage( playerid, COLOR_GREY, "Vehicle Fliped!" );

        }

        else SendClientMessage( playerid, COLOR_RED, "Nu esti intr-o masina!" );

        return ( 1 );

}[/pawn]

Posted

//==========================[Jetpack]===================================================
	if (strcmp(cmd, "/jetpack", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
			if (PlayerInfo[playerid][pAdmin] >= 7) //Level admin
			{
			    SendClientMessage(playerid, COLOR_GREY, "Now you have the jetpack  By TyX!");
                SetPlayerSpecialAction(playerid, 2);
                return 1;
			}
		}
	}
//=====================================[FLIP]============================================================
	if(strcmp(cmd, "/flip", true) == 0)
	{
		if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_BLUE, "You are not in vehicle!");
	 	{
	 	    if(PlayerInfo[playerid][pAdmin] < 3) // level admin
			{
			    SendClientMessage(playerid, COLOR_GRAD1, "You do not have access to this command");
			    return 1;
			}
	 		new vehicle;
		 	new Float:zangle;
		 	vehicle = GetPlayerVehicleID(playerid);
		 	GetVehicleZAngle(vehicle,zangle);
	 		SetVehicleZAngle(vehicle,zangle);
		 	SendClientMessage(playerid, COLOR_BLUE, "Your car was returned successfully by TyX!");
     	}
     	return 1;
 	}

El vroia comenzile pt toti playeri nu numai pt admini

Massari e curva mea

Posted

Ma ,nu am priceput :(( :((.Uite cum este la mine

dcmd_jetpack(playerid,params[]) {
    if(!strlen(params))	{
    	if(PlayerInfo[playerid][Level] >= 2 || IsPlayerAdmin(playerid)) {
			SendClientMessage(playerid,blue,"Jetpack Spawned.");
			CMDMessageToAdmins(playerid,"JETPACK");
			return SetPlayerSpecialAction(playerid, 2);
		} else return SendClientMessage(playerid,red,"ERROR: You are not a high enough level to use this command");
	} else {
	    new player1, playername[MAX_PLAYER_NAME], adminname[MAX_PLAYER_NAME], string[128];
    	player1 = strval(params);
		if(PlayerInfo[playerid][Level] >= 4)	{
		 	if(IsPlayerConnected(player1) && player1 != INVALID_PLAYER_ID && player1 != playerid)	{
				CMDMessageToAdmins(playerid,"JETPACK");		SetPlayerSpecialAction(player1, 2);
				GetPlayerName(player1, playername, sizeof(playername));		GetPlayerName(playerid, adminname, sizeof(adminname));
				format(string,sizeof(string),"Administrator \"%s\" has given you a jetpack",adminname); SendClientMessage(player1,blue,string);
				format(string,sizeof(string),"You have given %s a jetpack", playername);
				return SendClientMessage(playerid,blue,string);
			} else return SendClientMessage(playerid, red, "Player is not connected or is yourself");
		} else return SendClientMessage(playerid,red,"ERROR: You are not a high enough level to use this command");
	}
}

200r807.gif
Posted

Bagal pe asta

dcmd_jetpack(playerid,params[]) {
    if(!strlen(params))	{
    	if(PlayerInfo[playerid][Level] >= 0 || IsPlayerAdmin(playerid)) { // Aici inloc de 2 am pus 0
			SendClientMessage(playerid,blue,"Jetpack Spawned.");
			CMDMessageToAdmins(playerid,"JETPACK");
			return SetPlayerSpecialAction(playerid, 2);
		} else return SendClientMessage(playerid,red,"ERROR: You are not a high enough level to use this command");
	} else {
	    new player1, playername[MAX_PLAYER_NAME], adminname[MAX_PLAYER_NAME], string[128];
    	player1 = strval(params);
		if(PlayerInfo[playerid][Level] >= 0 )//si aici tot asa inloc de 4 am pus 0	{
		 	if(IsPlayerConnected(player1) && player1 != INVALID_PLAYER_ID && player1 != playerid)	{  SetPlayerSpecialAction(playerid,  SPECIAL_ACTION_USEJETPACK );
		 	SetPlayerSpecialAction(playerid,  SPECIAL_ACTION_USEJETPACK );
				CMDMessageToAdmins(playerid,"JETPACK");		
				GetPlayerName(player1, playername, sizeof(playername));		GetPlayerName(playerid, adminname, sizeof(adminname));
				format(string,sizeof(string),"Administrator \"%s\" has given you a jetpack",adminname); SendClientMessage(player1,blue,string);
				format(string,sizeof(string),"You have given %s a jetpack", playername);
				return SendClientMessage(playerid,blue,string);
			} else return SendClientMessage(playerid, red, "Player is not connected or is yourself");
		} else return SendClientMessage(playerid,red,"ERROR: You are not a high enough level to use this command");
	}
}

Posted

2x post = Warn,ai butonul "Edit"

Nu ai nevoie de IsPlayerAdmin(playerid)) in linia asta,comanda va functiona pentru oricine are level mai mare ca 0

[pawn]if(PlayerInfo[playerid][Level] >= 0 || IsPlayerAdmin(playerid)) { // Aici inloc de 2 am pus 0[/pawn]

gXvsYS
Posted

2x post = Warn,ai butonul "Edit"

Nu ai nevoie de IsPlayerAdmin(playerid)) in linia asta,comanda va functiona pentru oricine are level mai mare ca 0

[pawn]if(PlayerInfo[playerid][Level] >= 0 || IsPlayerAdmin(playerid)) { // Aici inloc de 2 am pus 0[/pawn]

Pai eu stiu ca nu e nevoie da asa mi-a dat el commadnu si iam lamurit sa nui stearg nimik

Restu isi face el 

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • 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.