Jump to content
  • 0

pomoc Povolání přes pickup


Paulie

Dotaz

zdarec pawneři... mam povolání ,ale jen přes příkaz a chtěl bych přes pickup a chci se zeptat jestli tápu správným směrem

new

[new Policie[MAX_PLAYERS];
         new Menu:pol;
         new polic;

 

Ongame

polic = CreatePickup(1581, 1,1545.3159,-1677.5873,13.5601);
polic = CreateMenu("~r~Policie",3,20,220,200,100);
   AddMenuItem(pol, 0, "Zamestnat"); 
   AddMenuItem(pol, 0, "Konec"); ]

 

Pickuppickup

if(pickupid == pol)
  {
  ShowMenuForPlayer(pol, playerid);
  }

 

Menurow

if (Current == pol)
{
new sendername[MAX_PLAYER_NAME];
GetPlayerName(playerid, sendername, sizeof(sendername)); 
GivePlayerWeapon(playerid,31,300);
GivePlayerWeapon(playerid,28,400);
GivePlayerWeapon(playerid,27,50);
SetPlayerSkin(playerid,280); //Skin 
SendClientMessage(playerid, COLOR_ORANGE, "Pridal jses k Policiji"); 
format(string, sizeof(string), "Hrač %s se pripojil k Policiji.", sendername); 
SendClientMessageToAll(COLOR_YELLOW, string);
SetPlayerColor(playerid, 0x33CCFFAA);
     }

Link to comment
Share on other sites

10 odpovědí na tuto otázku

Recommended Posts

  • 0

mas to zle tu mas moje ako to mam

 

if (Current == drogdmenu ) {
switch(row) {
case 0:{
if(povolanie[playerid] == 1 || povolanie[playerid] == 2 || povolanie[playerid] == 3 || povolanie[playerid] == 4 || povolanie[playerid] == 5 || povolanie[playerid] == 6 || povolanie[playerid] == 7 || povolanie[playerid] == 8 || povolanie[playerid] == 9 || povolanie[playerid] == 10 || povolanie[playerid] == 11 || povolanie[playerid] == 12 || povolanie[playerid] == 13 || povolanie[playerid] == 14  || povolanie[playerid] == 15  || povolanie[playerid] == 16 || povolanie[playerid] == 17)
	{
	SendClientMessage(playerid,COLOR_RED,"[ ! ] Už si zamesntaný, najprv daj výpoveď [ ! ]");
	}
if(povolanie[playerid] == 0)
	{
new pname[MAX_PLAYER_NAME];
GetPlayerName(playerid, pname, MAX_PLAYER_NAME);
	if (obcianka[playerid] == 1) {
format(string, sizeof(string), "[ - ] Hráč %s Sa pridal k pašerákom drog.[ - ]", pname);
SendClientMessageToAll(COLOR_RED, string);
SendClientMessage(playerid,COLOR_WHITE,"Tvoje prikazy: /urobdrogu /vyfajc");
povolanie[playerid] = 16;
SetPlayerSkin(playerid, 144);
SetPlayerColor(playerid,0xCCCCCCFF);
GivePlayerWeapon(playerid,28,250);
  	GivePlayerWeapon(playerid,23,150);
  	SetPlayerArmour(playerid,100);
  	SetPlayerHealth(playerid,100);
	}else{
if(obcianka[playerid] == 0) {
SendClientMessage(playerid, COLOR_YELLOW, "Aby si sa mohol zamestnať musíš mať občianský preukaz !");
}
}
}
}
}
}

 

njn mam tam kktiny tak drze huby a nekomnetujte a nekritizujte ako to mam urob to podla mna a pojde ti to ale nemusis setko ;)

Link to comment
Share on other sites

  • 0
[new Policie[MAX_PLAYERS];

new Menu:pol;

new polic;

 

to [ pred new bych tam nedaval

 

 

polic = CreatePickup(1581, 1,1545.3159,-1677.5873,13.5601);

polic = CreateMenu("~r~Policie",3,20,220,200,100);

AddMenuItem(pol, 0, "Zamestnat");

AddMenuItem(pol, 0, "Konec"); ]

taky spatne ..takto skus

 

polic = CreatePickup(1581, 1,1545.3159,-1677.5873,13.5601);
pol = CreateMenu("~r~Policie",3,20,220,200,100);
   AddMenuItem(pol, 0, "Zamestnat");
   AddMenuItem(pol, 0, "Konec"); ][/quote]

 

if(pickupid == pol)

{

ShowMenuForPlayer(pol, playerid);

}

spravne

if(polic == pickupid)
  {
  ShowMenuForPlayer(pol, playerid);
  }

Link to comment
Share on other sites

  • 0

if (Current == pol)

{

new sendername[MAX_PLAYER_NAME];

GetPlayerName(playerid, sendername, sizeof(sendername));

GivePlayerWeapon(playerid,31,300);

GivePlayerWeapon(playerid,28,400);

GivePlayerWeapon(playerid,27,50);

SetPlayerSkin(playerid,280); //Skin

SendClientMessage(playerid, COLOR_ORANGE, "Pridal jses k Policiji");

format(string, sizeof(string), "Hrač %s se pripojil k Policiji.", sendername);

SendClientMessageToAll(COLOR_YELLOW, string);

SetPlayerColor(playerid, 0x33CCFFAA);

}

A tuto je dobře??

Link to comment
Share on other sites

  • 0

if (Current == pol ) {

switch(row) {

case 0:{

new sendername[MAX_PLAYER_NAME];

GetPlayerName(playerid, sendername, sizeof(sendername));

GivePlayerWeapon(playerid,31,300);

GivePlayerWeapon(playerid,28,400);

GivePlayerWeapon(playerid,27,50);

SetPlayerSkin(playerid,280); //Skin

SendClientMessage(playerid, COLOR_ORANGE, "Pridal jses k Policiji");

format(string, sizeof(string), "Hrač %s se pripojil k Policiji.", sendername);

SendClientMessageToAll(COLOR_YELLOW, string);

SetPlayerColor(playerid, 0x33CCFFAA);

}

Takže jestli sem to dobře pochopil tak takle

Link to comment
Share on other sites

  • 0
if (Current == pol)

{

new sendername[MAX_PLAYER_NAME];

GetPlayerName(playerid, sendername, sizeof(sendername));

GivePlayerWeapon(playerid,31,300);

GivePlayerWeapon(playerid,28,400);

GivePlayerWeapon(playerid,27,50);

SetPlayerSkin(playerid,280); //Skin

SendClientMessage(playerid, COLOR_ORANGE, "Pridal jses k Policiji");

format(string, sizeof(string), "Hrač %s se pripojil k Policiji.", sendername);

SendClientMessageToAll(COLOR_YELLOW, string);

SetPlayerColor(playerid, 0x33CCFFAA);

}

A tuto je dobře??

 

řekl bych že spíše:

GetPlayerName(playerid, sendername, MAX_PLAYER_NAME);

Link to comment
Share on other sites

  • 0

este dotaz nepochopil sem vyznam new Policie[MAX_PLAYERS];

nebylo by lepsi new povolani[MAX_PLAYERS];

aby nekdo nemohl byz zamestnan 2najednouXD

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...