16.10.2011, 01:20
ai o player nao se mata
antes de eu adicionar + um fs que criei pegava
antes de eu adicionar + um fs que criei pegava
#include <a_samp>
#define kill 1234
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext, "/kill", true) == 0)
{
if(IsPlayerConnected(playerid))
{
ShowPlayerDialog(playerid,kill,DIALOG_STYLE_MSGBOX,"morre diabo","vc quer se matar","sim","nao");
}
return 1;
}
return 0;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 1234)
{
if(response == 0)
{
new str[100], pName[24]; GetPlayerName(playerid, pName, 24);
format(str, sizeof(str), "%s desistiu de se matar.", pName);
SendClientMessageToAll(-1, str);
}
if(response == 1) SetPlayerHealth(playerid, 0);
}
return 1;
}
#define kill 53105
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext, "/kill", true) == 0)
{
if(IsPlayerConnected(playerid))
{
ShowPlayerDialog(playerid,kill,DIALOG_STYLE_MSGBOX,"morre diabo","vc quer se matar","sim","nao");
}
return 1;
}
return 0;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == kill)
{
if(response == 0)
{
new str[100], pName[24]; GetPlayerName(playerid, pName, 24);
format(str, sizeof(str), "%s desistiu de se matar.", pName);
SendClientMessageToAll(-1, str);
}
if(response == 1) SetPlayerHealth(playerid, 0);
}
return 1;
}