22.02.2010, 05:34
Код:
if(strcmp("/drunk", cmdtext, true, 9) == 0) { new Float:pHealth; // You had to define this as a float - That was the tag mismatch error GetPlayerHealth(playerid, pHealth); SetPlayerDrunkLevel(playerid, GetPlayerDrunkLevel(playerid) + 2000); SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DRINK_BEER); ApplyAnimation(playerid,"PED","WALK_DRUNK",4.1,1,1,1,1,1); GameTextForPlayer(playerid,"~W~Drunk Mode Is ~g~On!",3000,5); SendClientMessage(playerid, 0xFF641AFF, "SERVER: Type /drunk off to Stop being Drunk."); SetPlayerHealth(playerid, pHealth + 20); // not sure what the =+ was for but this works fine return 1; } return 0; // Has to move this over a space due to loose indentation warning }