08.04.2013, 20:50
pawn Код:
#define pressionando(%0) \
(((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(pressionando(KEY_SECONDARY_ATTACK))
{
if(IsPlayerInRangeOfPoint(playerid, 5.0, 344.5580,309.7243,999.1557))
{
//ShowPlayerDialog(... "escolha o nome blablabla");
}
}
return 1;
}
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == blablabla)
{
if(response)
{
if(!strcmp(inputtext, "civil", true))
{
SendClientMessage(playerid,COLOR_WHITE, "Vocк agora estб disfarзado de CIVIL.");
SetPlayerColor(playerid, COLOR_WHITE);
SetPlayerSkin(playerid, 23);
return 1;
}
else if(!strcmp(inputtext, "pmls", true))
{
SendClientMessage(playerid,COLOR_LIGHTRED, "Vocк agora estб disfarзado de Policia Militar.");
SetPlayerColor(playerid, COLOR_LIGHTRED);
SetPlayerSkin(playerid,266);
return 1;
}
//todo o resto aqui...
}
return 1;
}
return 1;
}