31.07.2011, 22:09
Can some1 tell me how to make a menu on spawns.like when an player spawn they have 4 choices to choose from.and also their positions plz.
plz get me the code.
plz get me the code.
// At the top
#define SKINMENU 1337
public OnPlayerSpawn(playerid)
{
ShowPlayerDialog(playerid, SKINMENU, DIALOG_STYLE_LIST, "Skin Selection Menu", "Groove\nBallas\bAztecas\nVagos","Select","Cancel");
return 1;
}
public OnDialogResponse(playerid,dialogid,response,listitem,inputtext[])
{
if(dialogid == SKINMENU && response)
{
switch(listitem)
{
case 0:
{
SetPlayerPos(playerid, //SPAWN COORDINATES);
GivePlayerWeapon(playerid, //ID, //AMMO);
SetPlayerSkin(playerid, //SKIN ID);
}
case 1:
{
SetPlayerPos(playerid, //SPAWN COORDINATES);
GivePlayerWeapon(playerid, //ID, //AMMO);
SetPlayerSkin(playerid, //SKIN ID);
}
case 2:
{
SetPlayerPos(playerid, //SPAWN COORDINATES);
GivePlayerWeapon(playerid, //ID, //AMMO);
SetPlayerSkin(playerid, //SKIN ID);
}
case 3:
{
SetPlayerPos(playerid, //SPAWN COORDINATES);
GivePlayerWeapon(playerid, //ID, //AMMO);
SetPlayerSkin(playerid, //SKIN ID);
}
}
return 1;
}
return 0;
}
ShowPlayerDialog(playerid,1,DIALOG_STYLE_LIST,"Select Spawn","Spawn 1\nSpawn 2\nSpawn 3","Goto", "");
if(dialogid == 1)
{
if(response)
{
if(listitem == 0)
{
SetPlayerPos(playerid,x,y,z);
SetPlayerSkin(playereid,//Skin);
}
if(listitem == 1)
{
SetPlayerPos(playerid,//Location);
SetPlayerSkin(playereid,//Skin);
}
}