if(GetPVarInt(playerid, "variable_name") == 0) { SetPVarInt(playerid, "variable_name", 1); // Code - will only be executed once // or until "variable_name" is set back to 0}