Jump to content

[REZOLVAT] Comanda pe buton


s0nyx
 Share

Recommended Posts

Dar poate vrea sa pastreze comanda, el a zis sa il ajutam doar cu chestia asta.. da ai dreptate si tu dar fiecare face cum vrea.

Este fix acelasi lucru.. Poate chiar mai usor asa, sunt maxim 3-4 linii in plus, in rest la fel este

Link to comment
Share on other sites


if(newkeys & KEY_YES)
{
new params[64];
if(IsPlayerInRangeOfPoint(playerid, 2, 2122.9521,-1788.7916,13.5547))
{
return cmd_getjob(playerid, params);
}
else
{
return 1;
}
}

ETLTsrq.gif

 

       ezgif.com-video-to-gif.gif

Link to comment
Share on other sites

  • Administrator

@@s0nyx

#define 	MAX_JOBS 	10 // numarul maxim de joburi

public OnPlayerKeyStateChange( playerid, newkeys, oldkeys ) {

	if( newkeys == KEY_YES ) {

		for( new i = 0; i < MAX_JOBS; ++i ) {

			if( IsPlayerInRangeOfPoint( playerid, 2.5, jobVariabiles[ i ][ pozitieJobX ], jobVariabiles[ i ][ pozitieJobY ], jobVariabiles[ i ][ pozitieJobZ ] ) ) {

				// actiunea jobului sau returnezi direct comanda [/getjob], [/work] sau orice vrei sa faci cu acea tasta.
				// sau mai simplu poti returna direct comanda respectiva.

				Command_ReProcess( playerid, "comanda", help ); // y_commands

			}

		}

	}

	return true;
}
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...