public OnPlayerUpdate(playerid) { new drunk2 = GetPlayerDrunkLevel(playerid); if(drunk2 < 100) { SetPlayerDrunkLevel(playerid,2000); } else { if(DLlast[playerid] != drunk2) { new fps = DLlast[playerid] - drunk2; if((fps > 0) && (fps < 200)) DLlast[playerid] = drunk2; } } } |
public OnPlayerSpawn(playerid) { SendClientMessage(playerid, 0xFFFF00AA,"Welcome, use /cmds to get started!"); PlayerPlaySound(playerid, 1063, 0.0, 0.0, 10.0); PlayerPlaySound(playerid, 1058, 0.0, 0.0, 10.0); GameTextForPlayer(playerid,"~g~Use ~r~/car ~g~to spawn a car!",2000,5); SetPlayerPos(playerid,2022.3024,1342.3583,11); SetPlayerFacingAngle(playerid,266.3201); return 1; } |
public OnPlayerConnect(playerid) { TextDrawsShown[playerid] = false; VHSCreated[playerid] = false; LightRedHealthCreated[playerid] = false; LightYellowSpeedCreated[playerid] = false; new pname[MAX_PLAYER_NAME], string[22 + MAX_PLAYER_NAME]; GetPlayerName(playerid, pname, sizeof(pname)); format(string, sizeof(string), "%s Has Joined", pname); SendClientMessageToAll(0xAAAAAAAA, string); TextDrawShowForAll(Website); SendClientMessage(playerid, 0xFFFF00AA,"Connected"); SendClientMessage(playerid, 0xFFFF00AA,"Drifter's Home v0.1"); SendClientMessage(playerid, 0xFFFF00AA,"~Enjoy Your Stay!"); ShowPlayerDialog(playerid, 1, DIALOG_STYLE_MSGBOX, "Server Rules", "Hacks are allowed, but not for guns!\nRespect Players And Staff\nIgnorance Towards The Staff Will Result In A Ban\nDo Not Ask Staff To Do Things For You!\nConsider Yourself Warned!", "I Agree", "I Disagree"); return 1; } |
public OnPlayerUpdate(playerid)
{
new drunk2 = GetPlayerDrunkLevel(playerid);
if(drunk2 < 100)
{
SetPlayerDrunkLevel(playerid,2000);
}
else
{
if(DLlast[playerid] != drunk2)
{
new fps = DLlast[playerid] - drunk2;
if((fps > 0) && (fps < 200))
DLlast[playerid] = drunk2;
}
}
return 1;
}