18.07.2009, 16:02
i am learning about menues on player pickup allmost 5 days and i get my gamemode it works without errors but listen what is my problem
ATM in my gamemode:
when i go into ''i'' icon at airport it dont have effect and nothing ... and player can type /travel when he is not at ''i'' icone
and i want when player go into ''i'' icon at airport it say in chat ... Example: ''Type /travel, to see where u can travel" or something like this ...
so Exactly i want how to make when player is INTO ''i'' icone on airport JUST THERE he can type /travel
if he type /travel when he is not at ''i'' icone on airport show message for him example: ''you cant use this command here'' or something like this can u check my things about that and try to fix them please ? cuz its important for me![Smiley](images/smilies/smile.png)
here u have all what i have for my ''on player pickup menu''
on top of gamemode
than i have on
OnGameModeInit
----> what style is here the best for ''on player pickup menues'' i have ''19'' and i idk why
u can change this too ...
than here is my command /travel
OnPlayerPickUpPickUp...
with this i think when player pick this ''i'' icone it will say "Type /travel to see locations that u can travel" ... but when i connect
in my server and go to this ''i'' icone it dont have any effect
this is on callback
OnPlayerSelectedMenuRow - or something like this
and
OnPlayerExitedMenu - or something like this
thats all
if you need to see something else i will post ... just tell me what i must do here
i hope u udnerstand me what i want
ty
ATM in my gamemode:
when i go into ''i'' icon at airport it dont have effect and nothing ... and player can type /travel when he is not at ''i'' icone
and i want when player go into ''i'' icon at airport it say in chat ... Example: ''Type /travel, to see where u can travel" or something like this ...
so Exactly i want how to make when player is INTO ''i'' icone on airport JUST THERE he can type /travel
if he type /travel when he is not at ''i'' icone on airport show message for him example: ''you cant use this command here'' or something like this can u check my things about that and try to fix them please ? cuz its important for me
![Smiley](images/smilies/smile.png)
here u have all what i have for my ''on player pickup menu''
on top of gamemode
Код:
new travelpickup; new Menu:travelmenu;
OnGameModeInit
Код:
//MENU travelmenu = CreateMenu("Travelmenu", 2, 200.0, 100.0, 150.0, 150.0); AddMenuItem(travelmenu, 0, "LS Airport"); AddMenuItem(travelmenu, 0, "LS Jefferson Motel"); AddMenuItem(travelmenu, 0, "SF Airport"); AddMenuItem(travelmenu, 0, "SF Wang Cars"); AddMenuItem(travelmenu, 0, "Mount Chiliad"); AddMenuItem(travelmenu, 0, "Bayside Marina"); AddMenuItem(travelmenu, 1, "$700"); AddMenuItem(travelmenu, 1, "$500"); AddMenuItem(travelmenu, 1, "$650"); AddMenuItem(travelmenu, 1, "$600"); AddMenuItem(travelmenu, 1, "$800"); AddMenuItem(travelmenu, 1, "$680");
Код:
AddStaticPickup(1239, 19, 1673.5463,1447.8794,10.7851);
![Cheesy](images/smilies/biggrin.png)
than here is my command /travel
Код:
if(strcmp(cmd, "/travel", true) == 0) { ShowMenuForPlayer(travelmenu,playerid); TogglePlayerControllable(playerid, 0); } return 1;
with this i think when player pick this ''i'' icone it will say "Type /travel to see locations that u can travel" ... but when i connect
in my server and go to this ''i'' icone it dont have any effect
Код:
if (pickupid == travelpickup) { SendClientMessage(playerid, 0x33CCFFAA, "Type /travel to see locations that u can travel"); } return 1; }
OnPlayerSelectedMenuRow - or something like this
Код:
public OnPlayerSelectedMenuRow(playerid, row) { new Menu:CurrentMenu = GetPlayerMenu(playerid); if (CurrentMenu == travelmenu) { switch(row) { case 0: // LS AIRPORT { TogglePlayerControllable(playerid, 1); SetPlayerPos(playerid, 1961.7327,-2204.3582,434.6265); GivePlayerWeapon(playerid, 46, 1); GivePlayerMoney(playerid, -700); SetPlayerInterior(playerid, 0); SendClientMessage(playerid, 0xFFFF00AA, "Welcome to LS Airport, You pay $700"); } case 1: { TogglePlayerControllable(playerid, 1); SetPlayerPos(playerid, 2237.4546,-1186.4487,495.1394); GivePlayerWeapon(playerid, 46, 1); GivePlayerMoney(playerid, -500); SetPlayerInterior(playerid, 0); SendClientMessage(playerid, 0xFFFF00AA, "Welcome to Jefferson Motel, You pay $500"); } case 2: { TogglePlayerControllable(playerid, 1); SetPlayerPos(playerid, -1382.8453,-283.7133,384.6641); GivePlayerWeapon(playerid, 46, 1); GivePlayerMoney(playerid, -500); SetPlayerInterior(playerid, 0); SendClientMessage(playerid, 0xFFFF00AA, "SF Airport, You pay $650"); } case 3: { TogglePlayerControllable(playerid, 1); SetPlayerPos(playerid, -1958.2703,258.2352,526.7959); GivePlayerWeapon(playerid, 46, 1); GivePlayerMoney(playerid, -600); SetPlayerInterior(playerid, 0); SendClientMessage(playerid, 0xFFFF00AA, "Welcome to SF Wang Cars, You pay $600"); } case 4: { TogglePlayerControllable(playerid, 1); SetPlayerPos(playerid, -2317.3652,-1617.1685,805.7411); GivePlayerWeapon(playerid, 46, 1); GivePlayerMoney(playerid, -800); SetPlayerInterior(playerid, 0); SendClientMessage(playerid, 0xFFFF00AA, "Welcome to Chiliad, You pay $800"); } case 5: { TogglePlayerControllable(playerid, 1); SetPlayerPos(playerid, -2493.0112,2316.1333,483.6850); GivePlayerWeapon(playerid, 46, 1); GivePlayerMoney(playerid, -680); SetPlayerInterior(playerid, 0); SendClientMessage(playerid, 0xFFFF00AA, "Welcome to Bayside Marina, You pay $680"); } } } }
OnPlayerExitedMenu - or something like this
Код:
public OnPlayerExitedMenu(playerid) { TogglePlayerControllable(playerid,1); return 1; }
if you need to see something else i will post ... just tell me what i must do here
i hope u udnerstand me what i want
ty