07.02.2010, 01:05
Quote:
Originally Posted by Josma_cmd
kkkk mano acho q oq vc quer e isso olha ae.
pawn Код:
|
pawn Код:
#include <a_samp>
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext, "/Cerveja", true) == 0)
{
SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DRINK_BEER);
return 1;
}
if(strcmp(cmdtext, "/Cigarro", true) == 0)
{
SetPlayerSpecialAction(playerid,SPECIAL_ACTION_SMOKE_CIGGY);
return 1;
}
if(strcmp(cmdtext, "/Vinho", true) == 0)
{
SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DRINK_WINE);
return 1;
}
return 0;
}
public OnPlayerUpdate(playerid)
{
if(GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_DRINK_BEER)
{
GetPlayerDrunkLevel(playerid, 1999);
}
if(GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_DRINK_WINE)
{
GetPlayerDrunkLevel(playerid, 1999);
}
if(GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_SMOKE_CIGGY)
{
GetPlayerDrunkLevel(playerid, 10);
}
return 1;
}