public JailTest(playerid) { if(GetPVarInt(playerid, "Jail") >= 2) { format(file, 128, "/Accounts/%s.ini", GetName(playerid)); SetPVarInt(playerid, "Jail", GetPVarInt(playerid, "Jail")-1); new jailtext[150]; format(jailtext, sizeof(jailtext), "Jail: %i", GetPVarInt(playerid, "Jail")); GameTextForPlayer(playerid, jailtext, 1000, 1); SetPlayerHealth(playerid, 1000); } else if(GetPVarInt(playerid, "Jail") == 1) // >=0 { format(file, 128, "/Accounts/%s.ini", GetName(playerid)); SetPVarInt(playerid, "Jail", GetPVarInt(playerid, "Jail")-1); SetPlayerHealth(playerid, 100); SetPlayerPos(playerid, 621.689453125, -596.9580078125, 16.731489181519); SendClientMessage(playerid, COLOR_GREEN, "Unjailed!"); } return 1; }
GameTextForPlayer(playerid, jailtext, 1000, 1); |