teleport and weapons menu help !!! -
[Lsrcr]Rafa - 04.09.2010
ok guys i has scripted dialog menu of teleports and weapon's and i have problem when ill tupe the commands in the game the dialog showed me but cant teleport me and cant give me weapon take look:
Код:
// This is a comment
// uncomment the line below if you want to write a filterscript
//#define FILTERSCRIPT
#include <a_samp>
#define weaponmenu 1
#if defined FILTERSCRIPT
#endif
public OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp(cmdtext, "/weapons", true))
{
ShowPlayerDialog(playerid, weaponmenu, DIALOG_STYLE_LIST, "Weapons Menu", "\nShawn-Off \nTec9 \nM4 \nSniper", "Select", "Cancel");
return 1;
}
return 0;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == weaponmenu)
{
if(response)
{
if(listitem == 0) //Shawn-Off
{
GivePlayerWeapon(playerid, 26, 5004);
SendClientMessage(playerid, 0xCC6600, "You have picked Shawn-Off");
return 1;
}
if(listitem == 1) //Tec9
{
GivePlayerWeapon(playerid, 32, 5100);
SendClientMessage(playerid, 0xCC6600, "You have picked Tec9");
return 1;
}
if(listitem == 2) //M4
{
GivePlayerWeapon(playerid, 67, 5050);
SendClientMessage(playerid, 0xCC6600, "You have picked M4");
return 1;
}
if(listitem == 3) //Sniper
{
GivePlayerWeapon(playerid, 34, 5000);
SendClientMessage(playerid, 0xCC6600, "You have picked Sniper Rifle");
}
}
}
return 1;
}
this is for weapons dialog menu
and
Код:
// This is a comment
// uncomment the line below if you want to write a filterscript
//#define FILTERSCRIPT
#include <a_samp>
#define teleportmenu 1
#define weaponmenu 1
#if defined FILTERSCRIPT
#endif
public OnPlayerCommandText(playerid, cmdtext[])
{
if (!strcmp(cmdtext, "/teleport", true))
{
ShowPlayerDialog(playerid, teleportmenu, DIALOG_STYLE_LIST, "Teleport Menu", "\nDM Area" "\nStunt Area" "\nRace Area" "\nDrift Area" "\nAdmin Area", "Select", "Cancel");
return 1;
}
return 0;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == teleportmenu)
{
if(response)
{
if(listitem == 0) //DM AREA
{
SetPlayerPos(playerid, -975.975708,1060.983032,1345.671875);
SetPlayerInterior(playerid, 10);
SendClientMessage(playerid, 0xAA3333AA, "Welcome In DM Area");
return 1;
}
if(listitem == 1) //STUNT AREA
{
SendClientMessage(playerid, 0xAA3333AA, "NOT SCRIPTED YET");
}
if(listitem == 2) //RACE AREA
{
SendClientMessage(playerid, 0xAA3333AA, "NOT SCRIPTED YET");
}
if(listitem == 3) //DRIFT AREA
{
SendClientMessage(playerid, 0xAA3333AA, "NOT SCRIPTED YET");
}
if(listitem == 4) //ADMIN AREA
{
SetPlayerPos(playerid, -2879.232421875, 455.7958984375, 4.8951416015625);
SetPlayerInterior(playerid, 0);
SendClientMessage(playerid, 0xAA3333AA, "Welcome, In Admin Area. Enjoy In The Admin Area");
}
}
}
return 1;
}
and this is for teleports dialog menu
so please help
THANKS.
Re: teleport and weapons menu help !!! -
willsuckformoney - 04.09.2010
pawn Код:
// This is a comment
// uncomment the line below if you want to write a filterscript
//#define FILTERSCRIPT
#include <a_samp>
#define weaponmenu 1
#if defined FILTERSCRIPT
#endif
public OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp(cmdtext, "/weapons", true))
{
ShowPlayerDialog(playerid, weaponmenu, DIALOG_STYLE_LIST, "Weapons Menu", "Shawn-Off \nTec9 \nM4 \nSniper", "Select", "Cancel");
return 1;
}
return 0;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == weaponmenu)
{
if(response)
{
if(listitem == 0) //Shawn-Off
{
GivePlayerWeapon(playerid, 26, 5004);
SendClientMessage(playerid, 0xCC6600, "You have picked Shawn-Off");
return 1;
}
if(listitem == 1) //Tec9
{
GivePlayerWeapon(playerid, 32, 5100);
SendClientMessage(playerid, 0xCC6600, "You have picked Tec9");
return 1;
}
if(listitem == 2) //M4
{
GivePlayerWeapon(playerid, 67, 5050);
SendClientMessage(playerid, 0xCC6600, "You have picked M4");
return 1;
}
if(listitem == 3) //Sniper
{
GivePlayerWeapon(playerid, 34, 5000);
SendClientMessage(playerid, 0xCC6600, "You have picked Sniper Rifle");
}
}
}
return 1;
}
dont use \n at the first list
Re: teleport and weapons menu help !!! -
[Lsrcr]Rafa - 04.09.2010
thanks man !!
Re: teleport and weapons menu help !!! -
[Lsrcr]Rafa - 04.09.2010
dude again can't !! O_o
Re: teleport and weapons menu help !!! -
willsuckformoney - 04.09.2010
pawn Код:
// This is a comment
// uncomment the line below if you want to write a filterscript
//#define FILTERSCRIPT
#include <a_samp>
#define teleportmenu 1
#define weaponmenu 1
#if defined FILTERSCRIPT
#endif
public OnPlayerCommandText(playerid, cmdtext[])
{
if (!strcmp(cmdtext, "/teleport", true))
{
ShowPlayerDialog(playerid, teleportmenu, DIALOG_STYLE_LIST, "Teleport Menu", "DM Area" "\nStunt Area" "\nRace Area" "\nDrift Area" "\nAdmin Area", "Select", "Cancel");
return 1;
}
return 0;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == teleportmenu)
{
if(response)
{
if(listitem == 0) //DM AREA
{
SetPlayerPos(playerid, -975.975708,1060.983032,1345.671875);
SetPlayerInterior(playerid, 10);
SendClientMessage(playerid, 0xAA3333AA, "Welcome In DM Area");
return 1;
}
if(listitem == 1) //STUNT AREA
{
SendClientMessage(playerid, 0xAA3333AA, "NOT SCRIPTED YET");
}
if(listitem == 2) //RACE AREA
{
SendClientMessage(playerid, 0xAA3333AA, "NOT SCRIPTED YET");
}
if(listitem == 3) //DRIFT AREA
{
SendClientMessage(playerid, 0xAA3333AA, "NOT SCRIPTED YET");
}
if(listitem == 4) //ADMIN AREA
{
SetPlayerPos(playerid, -2879.232421875, 455.7958984375, 4.8951416015625);
SetPlayerInterior(playerid, 0);
SendClientMessage(playerid, 0xAA3333AA, "Welcome, In Admin Area. Enjoy In The Admin Area");
}
}
}
return 1;
}
That tele
Re: teleport and weapons menu help !!! -
[Lsrcr]Rafa - 04.09.2010
i think this is the same what i post o_0
Re: teleport and weapons menu help !!! -
willsuckformoney - 04.09.2010
no at the beginning of your dialog code you had
\nDM Area -- DM Area \nStunt Area
Re: teleport and weapons menu help !!! -
[Lsrcr]Rafa - 04.09.2010
yes i know but i delite that and again cant
Re: teleport and weapons menu help !!! -
Vandooz - 04.09.2010
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if (!strcmp(cmdtext, "/teleport", true))
{
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Teleport Menu", "DM Area\nStunt Area\nRace Area\nDrift Area\nAdmin Area", "Select", "Cancel");
return 1;
}
return 0;
}
And...
Re: teleport and weapons menu help !!! -
[Lsrcr]Rafa - 04.09.2010
ok ill try