05.11.2011, 21:48
Aн, criei esse cуdigo aqui, pra vocк botar no gm, mais nгo testei:
pawn Код:
//GameModeInit:
Create3DTextLabel("Aperte 'F' Para Ficar bebado", cor, x,y,z, 60, 0);
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if ((newkeys==KEY_SECONDARY_ATTACK)) // Key F / Enter
{
OnPlayerCommandText(playerid,"/bebida"); // Ao Apertar F irб Funfar isso
}
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext, "/bebida", true) == 0)
{
if(IsPlayerInRangeOfPoint(playerid, 2.0, x,y,z))//Cordenada do lugar.
{
ApplyAnimation(playerid, "PED", "WALK_DRUNK", 4.0, 1, 1, 1, 1, 0);
SendClientMessage(playerid, cor,"Vocк estб bebado!");
}
return 1;
}