20.10.2009, 15:23
Can we make with GetPlayerDrunkLevel for cops a command ?, like /checkdrunk [id] and then if you enter it, it says The Player is drunk or with SetPlayerDrunkLevel number?
public OnPlayerCommandText(playerid, cmdtext[])
{
new cmd[128], idx;
cmd = strtok(cmdtext, idx);
if(strcmp(cmd, "/checkdrunk", true) == 0)
{
new tmp[128], drunkz0r;
tmp = strtok(cmdtext, idx);
if(strlen(tmp) == 0) return SendClientMessage(playerid, 0xFFFFFFFF, "USAGE: /checkdrunk [playerid]");
GetPlayerDrunkLevel(strval(tmp));
if(drunkz0r > 0)
{
SendClientMessageToAll(0xFFFFFFFF, "w000t someone is drunk!!!11one!11");
}
return 1;
}
return 0;
}
if(GetPlayerDrunkLevel(playerid) > 1999 && GetPlayerDrunkLevel(playerid) < 2499) { SendClientMessage(playerid, 0xFFFFFFFF, "Drunk rate 1"); if(GetPlayerDrunkLevel(playerid) > 2499 && GetPlayerDrunkLevel(playerid) < 2999) { SendClientMessage(playerid, 0xFFFFFFFF, "Drunk rate 2"); if(GetPlayerDrunkLevel(playerid) > 2999 && GetPlayerDrunkLevel(playerid) < 3499) { SendClientMessage(playerid, 0xFFFFFFFF, "Drunk rate 3");
Originally Posted by wijnkamp
Mayb you can try something like this,
Код:
if(GetPlayerDrunkLevel(playerid) > 1999 && GetPlayerDrunkLevel(playerid) < 2499) { SendClientMessage(playerid, 0xFFFFFFFF, "Drunk rate 1"); if(GetPlayerDrunkLevel(playerid) > 2499 && GetPlayerDrunkLevel(playerid) < 2999) { SendClientMessage(playerid, 0xFFFFFFFF, "Drunk rate 2"); if(GetPlayerDrunkLevel(playerid) > 2999 && GetPlayerDrunkLevel(playerid) < 3499) { SendClientMessage(playerid, 0xFFFFFFFF, "Drunk rate 3"); I believe the highest GetPlayerDrunkLevel is 50000 so i would set the drunk levels higher else u need to make 100 rates. |
Originally Posted by MenaceX^
GetPlayerDrunkLevel can't pass 2000..
|
Originally Posted by $ЂЯĢ
If drunk level is under 2000 player is sober.
|
Originally Posted by Joe Staff
Quote:
...Also his wallet would be gone. |
Originally Posted by Joe Staff
Quote:
...Also his wallet would be gone. |