Sa-mp

apie sa-mp
 
rodiklisDUKIeškotiNarių sąrašasVartotojų grupėsRegistruotisPrisijungti

Share | 
 

 Meniu kurimas

Rodyti ankstesnę temą Rodyti sekančią temą Go down 
AutoriusPranešimas
Samas
Web masteris
Web masteris


Pranešimų skaičius : 7
Join date : 2008-03-25

RašytiTemos pavadinimas: Meniu kurimas   Antr. 03 25, 2008 1:27 am

Tai pradedam:
Ce bus teleporto meniu:)
Kodas:
new Menu:teleportmenu;
Sita eilute dedame aukstai prie #include <a_samp> arba prie #define
Kodas:
teleportmenu = CreateMenu("Teleportmenu", 2, 200.0, 100.0, 150.0, 150.0);
Sita eilute dedame i public OnGameModeInit()
Kodas:
AddMenuItem(teleportmenu, 0, "LS");
AddMenuItem(teleportmenu, 0, "LS");
AddMenuItem(teleportmenu, 0, "SF");
AddMenuItem(teleportmenu, 0, "SF");
AddMenuItem(teleportmenu, 0, "LV");
AddMenuItem(teleportmenu, 0, "LV");

AddMenuItem(teleportmenu, 1, "Grove Street");
AddMenuItem(teleportmenu, 1, "Starfish Tower");
AddMenuItem(teleportmenu, 1, "Wheel Arch Angels");
AddMenuItem(teleportmenu, 1, "Jizzys");
AddMenuItem(teleportmenu, 1, "4Dragons");
AddMenuItem(teleportmenu, 1, "Cum-a-Lot");
sita eilute dedame i public OnGameModeInit()
Kodas:
new Menu:CurrentMenu = GetPlayerMenu(playerid);
if(CurrentMenu == teleportmenu)
{
switch(row)
{
case 0: //Grove Street
{
SetPlayerPos(playerid, 2493.9133, -1682.3986, 13.3382);
SetPlayerInterior(playerid, 0);
SendClientMessage(playerid, 0xFFFFFFFF, "Welcome to Grove Street");
}
case 1: //Starfish Tower
{
SetPlayerPos(playerid, 1541.2833, -1362.4741, 329.6457);
SetPlayerInterior(playerid, 0);
SendClientMessage(playerid, 0xFFFFFFFF, "Welcome to the top of Starfish Tower");
}
case 2: //Wheel Arch Angels
{
SetPlayerPos(playerid, -2705.5503, 206.1621, 4.1797);
SetPlayerInterior(playerid, 0);
SendClientMessage(playerid, 0xFFFFFFFF, "Welcome to the Wheel Arch Angels tuning-shop");
}
case 3: //Jizzys
{
SetPlayerPos(playerid, -2617.5156, 1390.6353, 7.1105);
SetPlayerInterior(playerid, 0);
SendClientMessage(playerid, 0xFFFFFFFF, "Welcome to Jizzy's Nightclub!");
}
case 4: //4Dragons
{
SetPlayerPos(playerid, 2028.5538, 1008.3543, 10.8203);
SetPlayerInterior(playerid, 0);
SendClientMessage(playerid, 0xFFFFFFFF, "Welcome to the Four Dragons Casino");
}
case 5: //Com-a-Lot
{
SetPlayerPos(playerid, 2169.1838, 1122.5426, 12.6107);
SetPlayerInterior(playerid, 0);
SendClientMessage(playerid, 0xFFFFFFFF, "Welcome to the Com-a-Lot casino!");
}
}
}
sita dedame i public OnPlayerSelectedMenuRow(playerid, row)


Kodas:
ShowMenuForPlayer(teleportmenu, playerid);
return 1;
}
sita dedame i public OnPlayerCommandText(playerid, cmdtext[])
Atgal į viršų Go down
Peržiūrėti vartotojo aprašymą http://sa-mp-lt.forumr.net
 
Meniu kurimas
Rodyti ankstesnę temą Rodyti sekančią temą Atgal į viršų 
Puslapis 11

Permissions in this forum:Jūs negalite atsakinėti į pranešimus šiame forume
Sa-mp :: Sa-mp :: sa-mp Pagalba-
Pereiti į: