03.01.2011, 13:17
Nova Versгo Lanзada Em Dialog !!!
Creditos : Trinix e Qlimax
0.3c
Creditos : Trinix e Qlimax
pawn Код:
public OnPlayerKeyStateChange(playerid,newkeys,oldkeys)
{
if(newkeys == 16 && GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
{
if(!PlayerToPoint(1,playerid,1930.2745,-1772.3357,13.5469))
{
OnPlayerCommandText(playerid,"/luta");
}
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 200)
{
if(response)
{
if(listitem == 0)
{
SetPlayerFightingStyle(playerid, FIGHT_STYLE_BOXING);
}
if(listitem == 1)
{
SetPlayerFightingStyle(playerid, FIGHT_STYLE_KUNGFU);
}
if(listitem == 2)
{
SetPlayerFightingStyle(playerid, FIGHT_STYLE_KNEEHEAD);
}
if(listitem == 3)
{
SetPlayerFightingStyle (playerid, FIGHT_STYLE_GRABKICK);
}
if(listitem == 4)
{
SetPlayerFightingStyle(playerid, FIGHT_STYLE_ELBOW);
}
}
return 1;
}
public OnGameModeInit()
{
Create3DTextLabel("Digite /luta ou Pressione F",COLOR_WHITE,760.8009,5.5351,1000.7086,50.0,0);//textlabel da academia
AddStaticPickup(1314, 23, 760.8009,5.5351,1000.7086);//staticpickup da academia
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmd, "/luta", true) == 0)
{
if(PlayerToPoint(1.0,playerid,760.8009,5.5351,1000.7086))
{
new str[255] = "{FFFFFF} 1 {00FF00}Boxe\n{FFFFFF} 2 {00FF00}KungFu\n{FFFFFF} 3 {00FF00}Luta de Rua\n{FFFFFF} 4 {00FF00}GrabKick\n{FFFFFF} 5 {00FF00}ElBow";
ShowPlayerDialog(playerid, 200, DIALOG_STYLE_LIST, "{FFFF00}Estilos de Luta", str, "Selecionar", "Sair");
}
return 1;
}